test / app.py
wenkai's picture
Update app.py
34da01e verified
raw
history blame
596 Bytes
import gradio as gr
from huggingface_hub import hf_hub_download
def yes(message, history):
return "yes"
def vote(data: gr.LikeData):
if data.liked:
print("You upvoted this response: " + data.value["value"])
else:
print("You downvoted this response: " + data.value["value"])
hf_hub_download(repo_id="wenkai/FAPM", filename="model/checkpoint_bp1.pth")
with gr.Blocks() as demo:
chatbot = gr.Chatbot(placeholder="<strong>Your Personal Yes-Man</strong><br>Ask Me Anything")
gr.ChatInterface(fn=yes, type="messages", chatbot=chatbot)
demo.launch(share=True)