wenkai commited on
Commit
34da01e
·
verified ·
1 Parent(s): 4bea30e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
 
3
  def yes(message, history):
4
  return "yes"
@@ -8,10 +9,10 @@ def vote(data: gr.LikeData):
8
  print("You upvoted this response: " + data.value["value"])
9
  else:
10
  print("You downvoted this response: " + data.value["value"])
 
11
 
12
  with gr.Blocks() as demo:
13
  chatbot = gr.Chatbot(placeholder="<strong>Your Personal Yes-Man</strong><br>Ask Me Anything")
14
- chatbot.like(vote, None, None)
15
  gr.ChatInterface(fn=yes, type="messages", chatbot=chatbot)
16
 
17
  demo.launch(share=True)
 
1
  import gradio as gr
2
+ from huggingface_hub import hf_hub_download
3
 
4
  def yes(message, history):
5
  return "yes"
 
9
  print("You upvoted this response: " + data.value["value"])
10
  else:
11
  print("You downvoted this response: " + data.value["value"])
12
+ hf_hub_download(repo_id="wenkai/FAPM", filename="model/checkpoint_bp1.pth")
13
 
14
  with gr.Blocks() as demo:
15
  chatbot = gr.Chatbot(placeholder="<strong>Your Personal Yes-Man</strong><br>Ask Me Anything")
 
16
  gr.ChatInterface(fn=yes, type="messages", chatbot=chatbot)
17
 
18
  demo.launch(share=True)