Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -1,91 +1,45 @@
|
|
| 1 |
"""
|
| 2 |
-
Devrayog AI -
|
|
|
|
| 3 |
"""
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
-
import os
|
| 7 |
|
| 8 |
-
def
|
| 9 |
if not message.strip():
|
| 10 |
return "Please enter a message."
|
| 11 |
|
| 12 |
responses = {
|
| 13 |
-
"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
|
| 14 |
-
"Devrayog Vayu (Creative)": f"๐ [Devrayog Vayu]\n\nMessage: '{message}'\n\nI'm Vayu, the creative model. I excel at storytelling, brainstorming, and content
|
| 15 |
-
"Devrayog Akash (Powerful)": f"๐ [Devrayog Akash]\n\nAnalyzing: '{message}'\n\nI'm Akash, the most powerful model. I handle complex reasoning, analysis, and research.
|
| 16 |
}
|
| 17 |
-
|
| 18 |
-
response = responses.get(model_name, responses["Devrayog Agni (Fast)"])
|
| 19 |
-
if system_prompt:
|
| 20 |
-
response = f"[System: {system_prompt}]\n\n{response}"
|
| 21 |
-
return response
|
| 22 |
|
| 23 |
with gr.Blocks(title="Devrayog AI") as demo:
|
| 24 |
gr.Markdown("# ๐ฎ๐ณ Devrayog AI")
|
| 25 |
gr.Markdown("*India's First Solo-Built AI - By Devanshu Sharma (Hermes), Age 18, Rajasthan*")
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
output = gr.Textbox(label="Response", lines=10, interactive=False)
|
| 37 |
-
btn.click(fn=chat_with_devrayog, inputs=[msg, model, sys_prompt], outputs=output)
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
### ๐ Devrayog Vayu (Creative) - 9B
|
| 45 |
-
Storytelling, brainstorming, content
|
| 46 |
-
|
| 47 |
-
### ๐ Devrayog Akash (Powerful) - 8B
|
| 48 |
-
Complex reasoning, analysis, research
|
| 49 |
|
| 50 |
-
---
|
| 51 |
**Founder:** Devanshu Sharma (Hermes), 18, Neem Ka Thana, Rajasthan
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
with gr.Tab("๐ฏ SSB Prep"):
|
| 55 |
-
gr.Markdown("""
|
| 56 |
-
### 5-Day SSB Process
|
| 57 |
-
- **Day 1:** Screening (OIR + PPDT)
|
| 58 |
-
- **Day 2:** Psychology (TAT, WAT, SRT, SD)
|
| 59 |
-
- **Day 3-4:** GTO Tasks
|
| 60 |
-
- **Day 5:** Conference
|
| 61 |
-
|
| 62 |
-
### Tips
|
| 63 |
-
- Be yourself | Practice OIR daily | Write 6 TAT stories/day
|
| 64 |
-
- Current affairs | Physical fitness | Confidence
|
| 65 |
-
""")
|
| 66 |
-
|
| 67 |
-
with gr.Tab("โน๏ธ About"):
|
| 68 |
-
gr.Markdown("""
|
| 69 |
-
### About Devrayog AI
|
| 70 |
-
|
| 71 |
-
India's first solo-built AI company.
|
| 72 |
-
|
| 73 |
-
**Founder:** Devanshu Sharma (Hermes)
|
| 74 |
-
**Age:** 18
|
| 75 |
-
**From:** Neem Ka Thana, Rajasthan
|
| 76 |
-
|
| 77 |
-
**Mission:** Build India's most accessible AI.
|
| 78 |
-
|
| 79 |
-
**Models:** Agni (Fast) | Vayu (Creative) | Akash (Powerful)
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
""")
|
| 84 |
|
| 85 |
-
|
| 86 |
-
demo.launch(
|
| 87 |
-
server_name="0.0.0.0",
|
| 88 |
-
server_port=7860,
|
| 89 |
-
share=False,
|
| 90 |
-
quiet=True
|
| 91 |
-
)
|
|
|
|
| 1 |
"""
|
| 2 |
+
Devrayog AI - Minimal App for Hugging Face Spaces
|
| 3 |
+
Uses only pre-installed dependencies
|
| 4 |
"""
|
| 5 |
|
| 6 |
import gradio as gr
|
|
|
|
| 7 |
|
| 8 |
+
def chat(message, model_name):
|
| 9 |
if not message.strip():
|
| 10 |
return "Please enter a message."
|
| 11 |
|
| 12 |
responses = {
|
| 13 |
+
"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?",
|
| 14 |
+
"Devrayog Vayu (Creative)": f"๐ [Devrayog Vayu]\n\nMessage: '{message}'\n\nI'm Vayu, the creative model. I excel at storytelling, brainstorming, and content generation.",
|
| 15 |
+
"Devrayog Akash (Powerful)": f"๐ [Devrayog Akash]\n\nAnalyzing: '{message}'\n\nI'm Akash, the most powerful model. I handle complex reasoning, analysis, and research."
|
| 16 |
}
|
| 17 |
+
return responses.get(model_name, responses["Devrayog Agni (Fast)"])
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
with gr.Blocks(title="Devrayog AI") as demo:
|
| 20 |
gr.Markdown("# ๐ฎ๐ณ Devrayog AI")
|
| 21 |
gr.Markdown("*India's First Solo-Built AI - By Devanshu Sharma (Hermes), Age 18, Rajasthan*")
|
| 22 |
|
| 23 |
+
msg = gr.Textbox(label="Your Message", placeholder="Type here...", lines=3)
|
| 24 |
+
model = gr.Dropdown(
|
| 25 |
+
choices=["Devrayog Agni (Fast)", "Devrayog Vayu (Creative)", "Devrayog Akash (Powerful)"],
|
| 26 |
+
value="Devrayog Agni (Fast)",
|
| 27 |
+
label="Select Model"
|
| 28 |
+
)
|
| 29 |
+
btn = gr.Button("Send ๐", variant="primary")
|
| 30 |
+
output = gr.Textbox(label="Response", lines=10, interactive=False)
|
| 31 |
+
btn.click(fn=chat, inputs=[msg, model], outputs=output)
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
gr.Markdown("""
|
| 34 |
+
### Models
|
| 35 |
+
- ๐ฅ **Devrayog Agni** - Fast (3.8B params)
|
| 36 |
+
- ๐ **Devrayog Vayu** - Creative (9B params)
|
| 37 |
+
- ๐ **Devrayog Akash** - Powerful (8B params)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
|
|
|
| 39 |
**Founder:** Devanshu Sharma (Hermes), 18, Neem Ka Thana, Rajasthan
|
| 40 |
+
**Tagline:** India's First Solo-Built AI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
๐ Hugging Face: https://huggingface.co/dev2089
|
| 43 |
+
""")
|
|
|
|
| 44 |
|
| 45 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|