Update app.py
Browse files
app.py
CHANGED
@@ -105,6 +105,7 @@ if torch.__version__ >= "2":
|
|
105 |
def evaluate(
|
106 |
# instruction,
|
107 |
audio,
|
|
|
108 |
input=None,
|
109 |
temperature=0.1,
|
110 |
top_p=0.75,
|
@@ -172,7 +173,8 @@ def evaluate(
|
|
172 |
g = gr.Interface(
|
173 |
fn=evaluate,
|
174 |
inputs=[
|
175 |
-
gr.Audio(source="microphone", label = "
|
|
|
176 |
gr.components.Textbox(lines=2, label="Input", placeholder="none"),
|
177 |
gr.components.Slider(minimum=0, maximum=1, value=0.1, label="Temperature"),
|
178 |
gr.components.Slider(minimum=0, maximum=1, value=0.75, label="Top p"),
|
|
|
105 |
def evaluate(
|
106 |
# instruction,
|
107 |
audio,
|
108 |
+
upload,
|
109 |
input=None,
|
110 |
temperature=0.1,
|
111 |
top_p=0.75,
|
|
|
173 |
g = gr.Interface(
|
174 |
fn=evaluate,
|
175 |
inputs=[
|
176 |
+
gr.Audio(source="microphone", label = "请开始对话吧!", type="filepath"),
|
177 |
+
gr.Audio(source="upload", label = "请上传您喜欢的声音(wav文件)", type="filepath"),
|
178 |
gr.components.Textbox(lines=2, label="Input", placeholder="none"),
|
179 |
gr.components.Slider(minimum=0, maximum=1, value=0.1, label="Temperature"),
|
180 |
gr.components.Slider(minimum=0, maximum=1, value=0.75, label="Top p"),
|