Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files123234567891011121314151213141516171818192021222324252627282930313233343536373839402324432526274647282930315032335253545534353637383958404142434445464748495051525354556263645657586759606170717273747562636465666768806970717282737475768485777887888990798081828384969785868788899091"""Devrayog AI - Gradio Web AppDeployed on Hugging Face SpacesDevrayog AI - Gradio Web App for Hugging Face Spaces"""
import gradio as grimport os
def chat_with_devrayog(message, model_name, system_prompt): if not message.strip(): return "Please enter a message." model_responses = { "Devrayog Agni (Fast)": f"๐ฅ [Devrayog Agni - Fast Response]\n\nYour message: '{message}'\n\nI'm Devrayog Agni, the fast model optimized for quick responses. I can help with:\n- Quick answers\n- Coding help\n- Daily tasks\n- SSB preparation\n\nHow can I assist you further?", "Devrayog Vayu (Creative)": f"๐ [Devrayog Vayu - Creative Response]\n\nYour message: '{message}'\n\nI'm Devrayog Vayu, the creative model. I excel at:\n- Storytelling and creative writing\n- Brainstorming ideas\n- Content generation\n- Imaginative responses\n\nLet me craft something special for you!", "Devrayog Akash (Powerful)": f"๐ [Devrayog Akash - Deep Response]\n\nAnalyzing: '{message}'\n\nI'm Devrayog Akash, the most powerful model. I specialize in:\n- Complex reasoning\n- Deep analysis\n- Research tasks\n- Multi-step problem solving\n\nLet me provide a comprehensive response." 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 = model_responses.get(model_name, model_responses["Devrayog Agni (Fast)"]) response = responses.get(model_name, responses["Devrayog Agni (Fast)"]) if system_prompt: response = f"[System: {system_prompt}]\n\n{response}" return response
def get_model_info(): return """## Devrayog AI Models
### ๐ฅ Devrayog Agni (Fast) - 3.8B parametersBest for: Quick responses, coding, daily tasks
### ๐ Devrayog Vayu (Creative) - 9B parametersBest for: Storytelling, brainstorming, content generation
### ๐ Devrayog Akash (Powerful) - 8B parametersBest for: Complex reasoning, analysis, research
---**Founder:** Devanshu Sharma (Hermes), Age 18, Neem Ka Thana, Rajasthan**Tagline:** India's First Solo-Built AI"""
with gr.Blocks(title="Devrayog AI") as demo: gr.Markdown("# ๐ฎ๐ณ Devrayog AI") gr.Markdown("*India's First Solo-Built AI - Founded by Devanshu Sharma (Hermes), Age 18, Rajasthan*") gr.Markdown("*India's First Solo-Built AI - By Devanshu Sharma (Hermes), Age 18, Rajasthan*") with gr.Tab("๐ฌ Chat"): chat_input = gr.Textbox(label="Your Message", placeholder="Type your message here...", lines=3) model_select = gr.Dropdown( 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="Select Model" label="Model" ) system_prompt_input = gr.Textbox(label="System Prompt (Optional)", placeholder="Set custom system prompt...", lines=2) chat_btn = gr.Button("Send ๐", variant="primary") chat_output = gr.Textbox(label="Response", lines=10, interactive=False) chat_btn.click(fn=chat_with_devrayog, inputs=[chat_input, model_select, system_prompt_input], outputs=chat_output) 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(get_model_info()) 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("""## SSB Interview Preparation
### 5-Day Process### 5-Day SSB Process- **Day 1:** Screening (OIR + PPDT)- **Day 2:** Psychology (TAT, WAT, SRT, SD)- **Day 3-4:** GTO Tasks (GD, GPE, PGT, HGT, Command Task, FGT)- **Day 3-4:** GTO Tasks- **Day 5:** Conference
### Quick Tips- Be yourself, don't fake- Practice OIR daily- Write 6 TAT stories daily- Stay updated with current affairs- Maintain physical fitness### Tips- Be yourself | Practice OIR daily | Write 6 TAT stories/day- Current affairs | Physical fitness | Confidence """) with gr.Tab("โน๏ธ About"): gr.Markdown("""## About Devrayog AI### About Devrayog AI
India's first solo-built AI company.
**Devrayog AI** is India's first solo-built AI company, founded by **Devanshu Sharma (Hermes)**, an 18-year-old from Neem Ka Thana, Rajasthan.**Founder:** Devanshu Sharma (Hermes)**Age:** 18**From:** Neem Ka Thana, Rajasthan
### MissionTo build India's most accessible and powerful AI, created by a young Indian founder from a small town.**Mission:** Build India's most accessible AI.
### Models- **Devrayog Agni** - Fast and sharp (3.8B)- **Devrayog Vayu** - Creative and flowing (9B)- **Devrayog Akash** - Most powerful (8B)**Models:** Agni (Fast) | Vayu (Creative) | Akash (Powerful)
---*Built with โค๏ธ in India ๐ฎ๐ณ* """)
if __name__ == "__main__": demo.launch(server_name="0.0.0.0", server_port=7860, share=True)# Launch - HF Spaces compatibledemo.launch( server_name="0.0.0.0", server_port=7860, share=False, quiet=True)app.py+48-54