WICKED4950 commited on
Commit
7e3c3ff
·
verified ·
1 Parent(s): 00d7a2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from transformers import AutoModelForCausalLM, AutoTokenizer
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 = AutoModelForCausalLM.from_pretrained(model_name)
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