Spaces:
Sleeping
Sleeping
Download app.py from abdulabucom/popp: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/spaces/abdulabucom/popp/resolve/main/app.py
- Command line
-
hf download hf://spaces/abdulabucom/popp/app.py
-
curl -L -o app.py https://huggingface.co/spaces/abdulabucom/popp/resolve/main/app.py
317 Bytes
| import gradio as gr | |
| import google.generativeai as genai | |
| import os | |
| genai.configure(api_key=os.getenv("GEMINI_API_KEY")) | |
| model = genai.GenerativeModel("gemini-pro") | |
| def chatbot(message, history): | |
| response = model.generate_content(message) | |
| return response.text | |
| demo = gr.ChatInterface(chatbot) | |
| demo.launch() |