Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
3 |
-
|
4 |
-
# Install SentencePiece
|
5 |
import sentencepiece
|
6 |
import torch
|
7 |
|
@@ -19,8 +17,8 @@ def chatbot(input_text):
|
|
19 |
# Set up the Gradio interface
|
20 |
interface = gr.Interface(
|
21 |
fn=chatbot,
|
22 |
-
inputs=gr.
|
23 |
-
outputs=gr.
|
24 |
title="Healthcare Chatbot",
|
25 |
description="Ask healthcare-related questions, and get responses from the fine-tuned T5 model."
|
26 |
)
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
|
|
|
3 |
import sentencepiece
|
4 |
import torch
|
5 |
|
|
|
17 |
# Set up the Gradio interface
|
18 |
interface = gr.Interface(
|
19 |
fn=chatbot,
|
20 |
+
inputs=gr.Textbox(label="Enter your query"), # Corrected import
|
21 |
+
outputs=gr.Textbox(label="Response"), # Corrected import
|
22 |
title="Healthcare Chatbot",
|
23 |
description="Ask healthcare-related questions, and get responses from the fine-tuned T5 model."
|
24 |
)
|