Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091"""Devrayog AI - Gradio Web App for Hugging Face Spaces"""import gradio as grimport osdef chat_with_devrayog(message, model_name, system_prompt):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 help?","Devrayog Vayu (Creative)": f"๐ [Devrayog Vayu]\n\nMessage: '{message}'\n\nI'm Vayu, the creative model. I excel at storytelling, brainstorming, and content. What shall we create?","Devrayog Akash (Powerful)": f"๐ [Devrayog Akash]\n\nAnalyzing: '{message}'\n\nI'm Akash, the most powerful model. I handle complex reasoning, analysis, and research. Let me think deeply."}response = responses.get(model_name, responses["Devrayog Agni (Fast)"])if system_prompt:response = f"[System: {system_prompt}]\n\n{response}"return responsewith 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*")with gr.Tab("๐ฌ Chat"):msg = gr.Textbox(label="Message", placeholder="Type here...", lines=3)model = gr.Dropdown(choices=["Devrayog Agni (Fast)", "Devrayog Vayu (Creative)", "Devrayog Akash (Powerful)"],value="Devrayog Agni (Fast)",label="Model")sys_prompt = gr.Textbox(label="System Prompt (Optional)", lines=2)btn = gr.Button("Send ๐", variant="primary")output = gr.Textbox(label="Response", lines=10, interactive=False)btn.click(fn=chat_with_devrayog, inputs=[msg, model, sys_prompt], outputs=output)with gr.Tab("๐ Models"):gr.Markdown("""### ๐ฅ Devrayog Agni (Fast) - 3.8BQuick responses, coding, daily tasks### ๐ Devrayog Vayu (Creative) - 9BStorytelling, brainstorming, content### ๐ Devrayog Akash (Powerful) - 8BComplex reasoning, analysis, research---**Founder:** Devanshu Sharma (Hermes), 18, Neem Ka Thana, Rajasthan""")with gr.Tab("๐ฏ SSB Prep"):gr.Markdown("""### 5-Day SSB Process- **Day 1:** Screening (OIR + PPDT)- **Day 2:** Psychology (TAT, WAT, SRT, SD)- **Day 3-4:** GTO Tasks- **Day 5:** Conference### Tips- Be yourself | Practice OIR daily | Write 6 TAT stories/day- Current affairs | Physical fitness | Confidence""")with gr.Tab("โน๏ธ About"):gr.Markdown("""### About Devrayog AIIndia's first solo-built AI company.**Founder:** Devanshu Sharma (Hermes)**Age:** 18**From:** Neem Ka Thana, Rajasthan**Mission:** Build India's most accessible AI.**Models:** Agni (Fast) | Vayu (Creative) | Akash (Powerful)---*Built with โค๏ธ in India ๐ฎ๐ณ*""")# Launch - HF Spaces compatibledemo.launch(server_name="0.0.0.0",server_port=7860,share=False,quiet=True)123456789101112131415161718192021222324252627282930313233343536373839404142434445"""Devrayog AI - Minimal App for Hugging Face SpacesUses only pre-installed dependencies"""import gradio as grdef 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)
app.py+25-71