A mobile-optimized web application that uses GPT-4o to intelligently extract facts from unstructured text and submit them to the OMI API.
- GPT-4o AI-Powered Extraction: Uses advanced AI to identify and extract meaningful facts from messy, unstructured text
- Mobile-optimized UI with AI toggle
- Multi-line text input supporting various formats
- Smart fact extraction from complex text
- Submission of each fact to the OMI API
- Detailed status updates and error handling
- Install the required dependencies:
pip install -r requirements.txt- Set your OpenAI API key (required for AI-powered extraction):
# On Linux/macOS
export OPENAI_API_KEY=your_openai_api_key_here
# On Windows
set OPENAI_API_KEY=your_openai_api_key_hereAlternatively, you can edit the app.py file and replace the placeholder with your API key:
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", "your_openai_api_key_here")- go to Omi AI app in Appstore, create a new app with "external integration capability", and allow "facts"
Go to settings, copy your App ID and create private key
-
in app.py file, provide the app ID and private key you've generated
-
Run the Flask application:
python app.py- Open your browser and navigate to
http://localhost:5001
- Toggle AI-powered extraction on or off (on by default)
- Enter text in the textarea - this can be:
- Notes from a book or meeting
- Personal learning journal entries
- Bullet points of insights
- Any unstructured text containing facts
- Click the "Extract & Submit Facts" button
- The application will:
- Use GPT-4o to intelligently identify facts (if enabled)
- Fall back to rule-based extraction if AI is disabled or unavailable
- Display the extracted facts
- Submit each fact to the OMI API
- Show the results of the submission
- The frontend is built with HTML, CSS, and JavaScript
- The backend uses Flask to serve the application and handle API requests
- GPT-4o is used for intelligent fact extraction
- Rule-based extraction serves as a fallback
- Facts are sent to the OMI API individually
- Basic rate limiting is implemented to prevent API overload
If you encounter port conflicts:
- You can change the port in
app.pyby modifying the line:app.run(host='0.0.0.0', port=5001, debug=True) - On macOS, port 5000 is often used by AirPlay Receiver. You can disable this service in System Preferences > Sharing.
If the AI extraction is not working:
- Make sure you've set the OpenAI API key correctly
- Check the terminal for any API errors
- Try toggling to rule-based extraction as a fallback