Spaces:
Sleeping
Sleeping
初始提交
Browse files- app.py +3 -1
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
# app.py
|
| 2 |
import gradio as gr
|
|
|
|
|
|
|
| 3 |
import os
|
| 4 |
from gtts import gTTS
|
| 5 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
@@ -53,7 +55,7 @@ def chat_pipeline(audio_input=None, text_input=None):
|
|
| 53 |
with gr.Blocks() as demo:
|
| 54 |
gr.Markdown("## 🎙️ 語音助理(Hugging Face Space 測試版)")
|
| 55 |
with gr.Row():
|
| 56 |
-
mic = gr.Audio(
|
| 57 |
text_input = gr.Textbox(label="或輸入文字")
|
| 58 |
with gr.Row():
|
| 59 |
submit = gr.Button("送出")
|
|
|
|
| 1 |
# app.py
|
| 2 |
import gradio as gr
|
| 3 |
+
|
| 4 |
+
print("Gradio version:", gr.__version__)
|
| 5 |
import os
|
| 6 |
from gtts import gTTS
|
| 7 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 55 |
with gr.Blocks() as demo:
|
| 56 |
gr.Markdown("## 🎙️ 語音助理(Hugging Face Space 測試版)")
|
| 57 |
with gr.Row():
|
| 58 |
+
mic = gr.Audio(type="filepath", label="輸入語音")
|
| 59 |
text_input = gr.Textbox(label="或輸入文字")
|
| 60 |
with gr.Row():
|
| 61 |
submit = gr.Button("送出")
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
gradio==4.28.
|
| 2 |
gtts==2.5.1
|
| 3 |
transformers==4.41.1
|
| 4 |
torch==2.3.0
|
|
|
|
| 1 |
+
gradio==4.28.5
|
| 2 |
gtts==2.5.1
|
| 3 |
transformers==4.41.1
|
| 4 |
torch==2.3.0
|