kingabzpro commited on
Commit
979b48e
1 Parent(s): ae4c56c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,8 +22,8 @@ article = "<p style='text-align: center'><a href='https://medium.com/geekculture
22
  from transformers import AutoModelForCausalLM, AutoTokenizer
23
  import torch
24
 
25
- #tokenizer = AutoTokenizer.from_pretrained("kingabzpro/DialoGPT-small-Rick-Bot")
26
- #model = AutoModelForCausalLM.from_pretrained("kingabzpro/DialoGPT-small-Rick-Bot")
27
 
28
  def predict(input, history=[]):
29
  # tokenize the new input sentence
@@ -40,7 +40,7 @@ def predict(input, history=[]):
40
 
41
  return response, history
42
 
43
- gr.Interface.load("huggingface/kingabzpro/DialoGPT-small-Rick-Bot",inputs = "textbox", outputs = "chatbot",allow_flagging = "manual",theme ="grass",title = title,lagging_callback=hf_writer,description = description, article = article ).launch(enable_queue=True) # customizes the input component
44
 
45
  #theme ="grass",
46
  #title = title,
 
22
  from transformers import AutoModelForCausalLM, AutoTokenizer
23
  import torch
24
 
25
+ tokenizer = AutoTokenizer.from_pretrained("kingabzpro/DialoGPT-small-Rick-Bot")
26
+ model = AutoModelForCausalLM.from_pretrained("kingabzpro/DialoGPT-small-Rick-Bot")
27
 
28
  def predict(input, history=[]):
29
  # tokenize the new input sentence
 
40
 
41
  return response, history
42
 
43
+ gr.Interface(fn = predict,inputs = "textbox", outputs = "chatbot",allow_flagging = "manual",theme ="grass",title = title,lagging_callback=hf_writer,description = description, article = article ).launch(enable_queue=True) # customizes the input component
44
 
45
  #theme ="grass",
46
  #title = title,