Update app.py
Browse files
app.py
CHANGED
@@ -150,7 +150,7 @@ async def main(link):
|
|
150 |
stream=False
|
151 |
)
|
152 |
|
153 |
-
generated_script = completion.choices[0].message.content
|
154 |
|
155 |
print("Generated Script:"+generated_script)
|
156 |
|
@@ -175,11 +175,11 @@ with gr.Blocks(theme='soft', css=css, title="Musen") as iface:
|
|
175 |
with gr.Row():
|
176 |
output_box = gr.Audio(label="播客", type="filepath", interactive=False, autoplay=True, elem_classes="audio") # Create an output textbox
|
177 |
with gr.Row():
|
178 |
-
input_box = gr.Textbox(label="
|
179 |
with gr.Row():
|
180 |
submit_btn = gr.Button("🚀 发送") # Create a submit button
|
181 |
clear_btn = gr.ClearButton(output_box, value="🗑️ 清除") # Create a clear button
|
182 |
-
gr.Examples(examples=Examples, inputs=input_box, outputs=output_box, fn=main, cache_examples="lazy")
|
183 |
|
184 |
# Set up the event listeners
|
185 |
submit_btn.click(main, inputs=input_box, outputs=output_box)
|
|
|
150 |
stream=False
|
151 |
)
|
152 |
|
153 |
+
generated_script = extract_content(completion.choices[0].message.content)
|
154 |
|
155 |
print("Generated Script:"+generated_script)
|
156 |
|
|
|
175 |
with gr.Row():
|
176 |
output_box = gr.Audio(label="播客", type="filepath", interactive=False, autoplay=True, elem_classes="audio") # Create an output textbox
|
177 |
with gr.Row():
|
178 |
+
input_box = gr.Textbox(label="网址", placeholder="请输入https开头的网址")
|
179 |
with gr.Row():
|
180 |
submit_btn = gr.Button("🚀 发送") # Create a submit button
|
181 |
clear_btn = gr.ClearButton(output_box, value="🗑️ 清除") # Create a clear button
|
182 |
+
gr.Examples(examples=Examples, inputs=input_box, outputs=output_box, fn=main, label="示例", cache_examples="lazy")
|
183 |
|
184 |
# Set up the event listeners
|
185 |
submit_btn.click(main, inputs=input_box, outputs=output_box)
|