Summarize chat messages using OpenRouter LLM with a Gradio web interface.
- Copy
.env.exampleto.envand add your OpenRouter API key:
OPENROUTER_API_KEY=sk-or-v1-your-key-here
MODEL_ID=mistralai/mistral-7b-instruct:free
- Install dependencies (if needed):
pip install -r requirements.txtRun the Gradio app:
python app.pyThen paste your chat messages as JSON:
[
{"sender": "Alice", "message": "Hello!"},
{"sender": "Bob", "message": "Hi there!"}
]config.py- Configuration and environment variablesllm_client.py- OpenRouter API clientsummarizer.py- Summarization logicapp.py- Gradio web interface