Spaces:
Sleeping
Sleeping
File size: 2,671 Bytes
37dcfa5 4c3f2c6 37dcfa5 4c3f2c6 37dcfa5 4c3f2c6 37dcfa5 4c3f2c6 37dcfa5 9362701 4c3f2c6 9362701 4c3f2c6 9362701 4c3f2c6 9362701 4c3f2c6 9362701 4c3f2c6 9362701 4c3f2c6 9362701 4c3f2c6 9362701 4c3f2c6 9362701 4c3f2c6 9362701 4c3f2c6 9362701 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | import gradio as gr
def generate_telugu(prompt, content_type):
return f"Coming soon! నాదిని is being set up...\n\nYour prompt: {prompt}\nType: {content_type}\n\nPlease visit: https://huggingface.co/mohantvj/naadini-telugu for usage instructions."
with gr.Blocks(title="నాదిని - Telugu Creative AI") as demo:
gr.Markdown("""
# 🎵 నాదిని (Naadini) - Telugu Creative AI
**నాదిని** means *"She who is the source of divine sound, poetry and wisdom"*
⚠️ Full model requires Apple Silicon Mac.
See [model page](https://huggingface.co/mohantvj/naadini-telugu) for installation.
తెలుగులో కవితలు, పాటలు, కథలు రాయండి!
""")
with gr.Row():
with gr.Column():
content_type = gr.Dropdown(
choices=[
"కవిత (Poem)",
"పాట (Song)",
"కథ (Story)",
"పద్యం (Classical)",
"సంభాషణ (Conversation)"
],
value="కవిత (Poem)",
label="What to Write"
)
prompt = gr.Textbox(
placeholder="వర్షం గురించి ఒక కవిత రాయండి...",
label="Your Prompt",
lines=3
)
generate_btn = gr.Button("✨ Generate", variant="primary")
with gr.Column():
output = gr.Textbox(
label="నాదిని's Response",
lines=15
)
gr.Examples(
examples=[
["వర్షం గురించి ఒక అందమైన కవిత రాయండి", "కవిత (Poem)"],
["అమ్మ గురించి ఒక పాట రాయండి", "పాట (Song)"],
["పిల్లల కోసం ఒక చిన్న కథ రాయండి", "కథ (Story)"],
],
inputs=[prompt, content_type]
)
generate_btn.click(
fn=generate_telugu,
inputs=[prompt, content_type],
outputs=output
)
gr.Markdown("""
---
Built with ❤️ by **Thonangi Venkata Jagan Mohan**
## How to Use Locally
```bash
pip install mlx-lm
```
```python
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load(
"mlx-community/Qwen3-14B-4bit",
adapter_path="mohantvj/naadini-telugu"
)
```
""")
demo.launch() |