Spaces:
Sleeping
Sleeping
fix: import tempfile and stabilize UI CSS rendering in Gradio 6
Browse files
app.py
CHANGED
|
@@ -1,9 +1,8 @@
|
|
| 1 |
import os
|
| 2 |
import base64
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
from pathlib import Path
|
| 5 |
-
import base64
|
| 6 |
-
import os
|
| 7 |
import requests
|
| 8 |
from mistralai.client import Mistral
|
| 9 |
|
|
@@ -376,7 +375,7 @@ def init_voices_ui():
|
|
| 376 |
default_val = choices[0][1] if choices else None
|
| 377 |
return gr.update(choices=choices, value=default_val)
|
| 378 |
|
| 379 |
-
with gr.Blocks(title="Voxtral Studio — Mistral AI Audio") as demo:
|
| 380 |
|
| 381 |
gr.HTML("""
|
| 382 |
<div class="app-header">
|
|
@@ -538,4 +537,4 @@ with gr.Blocks(title="Voxtral Studio — Mistral AI Audio") as demo:
|
|
| 538 |
demo.load(fn=init_voices_ui, outputs=tts_voice_id)
|
| 539 |
|
| 540 |
if __name__ == "__main__":
|
| 541 |
-
demo.launch(server_name="0.0.0.0", server_port=7860
|
|
|
|
| 1 |
import os
|
| 2 |
import base64
|
| 3 |
+
import tempfile
|
| 4 |
import gradio as gr
|
| 5 |
from pathlib import Path
|
|
|
|
|
|
|
| 6 |
import requests
|
| 7 |
from mistralai.client import Mistral
|
| 8 |
|
|
|
|
| 375 |
default_val = choices[0][1] if choices else None
|
| 376 |
return gr.update(choices=choices, value=default_val)
|
| 377 |
|
| 378 |
+
with gr.Blocks(title="Voxtral Studio — Mistral AI Audio", css=css) as demo:
|
| 379 |
|
| 380 |
gr.HTML("""
|
| 381 |
<div class="app-header">
|
|
|
|
| 537 |
demo.load(fn=init_voices_ui, outputs=tts_voice_id)
|
| 538 |
|
| 539 |
if __name__ == "__main__":
|
| 540 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|