Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import
|
| 3 |
import tensorflow as tf
|
| 4 |
print("Loading the model......")
|
| 5 |
model_name = "WICKED4950/Irisonego5"
|
|
@@ -7,7 +7,7 @@ strategy = tf.distribute.MirroredStrategy()
|
|
| 7 |
tf.config.optimizer.set_jit(True) # Enable XLA
|
| 8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 9 |
with strategy.scope():
|
| 10 |
-
model =
|
| 11 |
|
| 12 |
print("Interface getting done....")
|
| 13 |
# Define the chatbot function
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import AutoTokenizer, TFBlenderbotForConditionalGeneration
|
| 3 |
import tensorflow as tf
|
| 4 |
print("Loading the model......")
|
| 5 |
model_name = "WICKED4950/Irisonego5"
|
|
|
|
| 7 |
tf.config.optimizer.set_jit(True) # Enable XLA
|
| 8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 9 |
with strategy.scope():
|
| 10 |
+
model = TFBlenderbotForConditionalGeneration.from_pretrained(model_name)
|
| 11 |
|
| 12 |
print("Interface getting done....")
|
| 13 |
# Define the chatbot function
|