Chatbot / app.py
jmparejaz's picture
Update app.py
c2d5b1a
import gradio as gr
title = "Question & Answering Finetuned with SquadV2"
context = """
The leopard seal (Hydrurga leptonyx), also referred to as the sea leopard,[3] is the second largest species of seal in the Antarctic (after the southern elephant seal). Its only natural predator is the orca.[4] It feeds on a wide range of prey including cephalopods, other pinnipeds, krill, fish, and birds, particularly penguins. It is the only species in the genus Hydrurga. Its closest relatives are the Ross seal, the crabeater seal and the Weddell seal, which together are known as the tribe of Lobodontini seals.[5][6] The name hydrurga means 'water worker' and leptonyx is the Greek for 'thin-clawed'.
"""
question = "Name one orca predator"
gr.Interface.load("huggingface/jmparejaz/qa_bert_finetuned-squad", title=title, inputs=[gr.Textbox( value=context,label="Context", lines=5), gr.Textbox(value=question,label="Question")]).launch()
#gr.Interface.load("huggingface/jmparejaz/TFqa-finetuned-distilbert-base-cased", title=title, inputs=[gr.Textbox( value=context,label="Context", lines=5), gr.Textbox(value=question,label="Question")]).launch()