devrayog-api / app.py
dev2089's picture
Upload app.py with huggingface_hub
27ac8d8 verified
Raw History Blame
1.93 kB
"""
Devrayog AI - Minimal App for Hugging Face Spaces
Uses only pre-installed dependencies
"""
import gradio as gr
def chat(message, model_name):
if not message.strip():
return "Please enter a message."
responses = {
"Devrayog Agni (Fast)": f"๐Ÿ”ฅ [Devrayog Agni]\n\nMessage: '{message}'\n\nI'm Agni, the fast model. I help with quick answers, coding, daily tasks, and SSB prep. How can I assist you?",
"Devrayog Vayu (Creative)": f"๐ŸŒŠ [Devrayog Vayu]\n\nMessage: '{message}'\n\nI'm Vayu, the creative model. I excel at storytelling, brainstorming, and content generation.",
"Devrayog Akash (Powerful)": f"๐ŸŒŒ [Devrayog Akash]\n\nAnalyzing: '{message}'\n\nI'm Akash, the most powerful model. I handle complex reasoning, analysis, and research."
}
return responses.get(model_name, responses["Devrayog Agni (Fast)"])
with gr.Blocks(title="Devrayog AI") as demo:
gr.Markdown("# ๐Ÿ‡ฎ๐Ÿ‡ณ Devrayog AI")
gr.Markdown("*India's First Solo-Built AI - By Devanshu Sharma (Hermes), Age 18, Rajasthan*")
msg = gr.Textbox(label="Your Message", placeholder="Type here...", lines=3)
model = gr.Dropdown(
choices=["Devrayog Agni (Fast)", "Devrayog Vayu (Creative)", "Devrayog Akash (Powerful)"],
value="Devrayog Agni (Fast)",
label="Select Model"
)
btn = gr.Button("Send ๐Ÿš€", variant="primary")
output = gr.Textbox(label="Response", lines=10, interactive=False)
btn.click(fn=chat, inputs=[msg, model], outputs=output)
gr.Markdown("""
### Models
- ๐Ÿ”ฅ **Devrayog Agni** - Fast (3.8B params)
- ๐ŸŒŠ **Devrayog Vayu** - Creative (9B params)
- ๐ŸŒŒ **Devrayog Akash** - Powerful (8B params)
**Founder:** Devanshu Sharma (Hermes), 18, Neem Ka Thana, Rajasthan
**Tagline:** India's First Solo-Built AI
๐Ÿ”— Hugging Face: https://huggingface.co/dev2089
""")
demo.launch(server_name="0.0.0.0", server_port=7860)