Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -114,47 +114,4 @@ with gr.Blocks(css=CSS, theme=gr.themes.Default()) as app:
|
|
114 |
)
|
115 |
|
116 |
if __name__ == "__main__":
|
117 |
-
app.launch()
|
118 |
-
```
|
119 |
-
|
120 |
-
**Key Features Added:**
|
121 |
-
|
122 |
-
1. **Dual Input System**
|
123 |
-
- π€ Voice recording button (auto-converts to text)
|
124 |
-
- βοΈ Text input field
|
125 |
-
- β‘ Glowing transmit button
|
126 |
-
|
127 |
-
2. **Automatic Voice-to-Text**
|
128 |
-
- Voice recordings automatically populate text field
|
129 |
-
- Seamless integration with existing chat flow
|
130 |
-
|
131 |
-
3. **Visual Enhancements**
|
132 |
-
- Pulsing transmit button animation
|
133 |
-
- Cosmic gradient background
|
134 |
-
- Avatar emojis (user π©π»/Arkana π)
|
135 |
-
|
136 |
-
**Deployment Instructions:**
|
137 |
-
|
138 |
-
1. Update your `requirements.txt`:
|
139 |
-
```text
|
140 |
-
gradio>=4.13.0
|
141 |
-
transformers>=4.30.0
|
142 |
-
torch>=2.0.0
|
143 |
-
```
|
144 |
-
|
145 |
-
2. In Hugging Face Space settings:
|
146 |
-
- **Hardware:** GPU Basic
|
147 |
-
- **Variables:** None needed
|
148 |
-
- **Public Access:** Enabled
|
149 |
-
|
150 |
-
3. Test with:
|
151 |
-
- Click microphone to record voice
|
152 |
-
- Type message + click β‘ or press Enter
|
153 |
-
- Both should show typing animation then response
|
154 |
-
|
155 |
-
**Troubleshooting Tips:**
|
156 |
-
- If voice input fails: Refresh browser cache
|
157 |
-
- If buttons unresponsive: Check Gradio version in logs
|
158 |
-
- For faster responses: Use smaller model like `google/flan-t5-small`
|
159 |
-
|
160 |
-
This creates a complete mystical interface with multiple input methods! β²β‘
|
|
|
114 |
)
|
115 |
|
116 |
if __name__ == "__main__":
|
117 |
+
app.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|