Spaces:
Runtime error
Runtime error
Delete app.py
Browse files
app.py
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from LLMwithvoice import gradio_interface
|
3 |
-
|
4 |
-
# Define the Gradio interface
|
5 |
-
iface = gr.Interface(
|
6 |
-
fn=gradio_interface,
|
7 |
-
inputs=[
|
8 |
-
gr.Textbox(type="password", lines=1, label="Hugging Face API Token", placeholder="Enter your Hugging Face API token here..."),
|
9 |
-
gr.Textbox(lines=2, label="Context", placeholder="Enter the context here..."),
|
10 |
-
gr.Textbox(lines=1, label="Question", placeholder="Enter your question here...")
|
11 |
-
],
|
12 |
-
outputs=[
|
13 |
-
gr.Textbox(label="Answer"),
|
14 |
-
gr.Audio(label="Answer as Speech", type="file") # Changed to file type to allow playing
|
15 |
-
],
|
16 |
-
title="Chat with Roberta with Voice",
|
17 |
-
description="Ask questions based on a provided context using the Roberta model and hear the response via text-to-speech."
|
18 |
-
)
|
19 |
-
|
20 |
-
# Launch the Gradio app
|
21 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|