Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# Load the tokenizer and model
|
| 5 |
-
tokenizer = AutoTokenizer.from_pretrained("ahmed792002/Finetuning_T5_HealthCare_Chatbot")
|
| 6 |
model = AutoModelForSeq2SeqLM.from_pretrained("ahmed792002/Finetuning_T5_HealthCare_Chatbot")
|
| 7 |
|
| 8 |
# Define the chatbot function
|
|
|
|
|
|
|
| 1 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 2 |
|
| 3 |
+
# Install SentencePiece
|
| 4 |
+
import sentencepiece
|
| 5 |
+
import torch
|
| 6 |
+
|
| 7 |
# Load the tokenizer and model
|
| 8 |
+
tokenizer = AutoTokenizer.from_pretrained("ahmed792002/Finetuning_T5_HealthCare_Chatbot", use_fast=True)
|
| 9 |
model = AutoModelForSeq2SeqLM.from_pretrained("ahmed792002/Finetuning_T5_HealthCare_Chatbot")
|
| 10 |
|
| 11 |
# Define the chatbot function
|