abidlabs HF Staff commited on
Commit
594a418
·
1 Parent(s): 1b950dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -1,9 +1,6 @@
1
  import os
2
  import gradio as gr
3
 
4
- HF_TOKEN = os.getenv('HF_TOKEN')
5
- hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "Rick-bot-flags")
6
-
7
  title = "Ask Rick a Question"
8
  description = """
9
  <center>
@@ -33,4 +30,4 @@ def predict(input):
33
  response = tokenizer.decode(history[0]).split("<|endoftext|>")
34
  return response[1]
35
 
36
- gr.Interface(fn = predict, inputs = ["textbox"], outputs = ["text"],allow_flagging = "manual",title = title, flagging_callback = hf_writer, description = description, article = article ).launch(enable_queue=True) # customizes the input component
 
1
  import os
2
  import gradio as gr
3
 
 
 
 
4
  title = "Ask Rick a Question"
5
  description = """
6
  <center>
 
30
  response = tokenizer.decode(history[0]).split("<|endoftext|>")
31
  return response[1]
32
 
33
+ gr.Interface(fn = predict, inputs = ["textbox"], outputs = ["text"],allow_flagging = "manual",title = title, description = description, article = article ).launch(enable_queue=True) # customizes the input component