jmparejaz commited on
Commit
1524052
1 Parent(s): fa0571e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -1,14 +1,11 @@
1
  import gradio as gr
2
 
3
- title = "Question_Answering_DistilBert_Finetuned_on_SQuAD_Demo"
4
 
5
  context = """
6
- The Amazon rainforest (Portuguese: Floresta Amaz么nica or Amaz么nia; Spanish: Selva Amaz贸nica, Amazon铆a or usually Amazonia; French: For锚t amazonienne; Dutch: Amazoneregenwoud), also known in English as Amazonia or the Amazon Jungle, is a moist broadleaf forest that covers most of the Amazon basin of South America. This basin encompasses 7,000,000 square kilometres (2,700,000 sq mi), of which 5,500,000 square kilometres (2,100,000 sq mi) are covered by the rainforest. This region includes territory belonging to nine nations. The majority of the forest is contained within Brazil, with 60% of the rainforest, followed by Peru with 13%, Colombia with 10%, and with minor amounts in Venezuela, Ecuador, Bolivia, Guyana, Suriname and French Guiana. States or departments in four nations contain "Amazonas" in their names. The Amazon represents over half of the planet's remaining rainforests, and comprises the largest and most biodiverse tract of tropical rainforest in the world, with an estimated 390 billion individual trees divided into 16,000 species.
7
  """
8
 
9
- question = "Which name is also used to describe the Amazon rainforest in English?"
10
 
11
- gr.Interface.load("huggingface/jmparejaz/qa_bert_finetuned-squad",
12
- title=title,
13
- inputs=[gr.Textbox(label="Context", lines=5, value=context),
14
- gr.Textbox(label="Question", value=question)]).launch()
 
1
  import gradio as gr
2
 
3
+ title = "Question & Answering Finetuned with SquadV2"
4
 
5
  context = """
6
+ 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".
7
  """
8
 
9
+ question = "Name one orca predator"
10
 
11
+ gr.Interface.load("huggingface/jmparejaz/qa_bert_finetuned-squad", title=title, inputs=[gr.Textbox(label="Context", lines=5, value=context), gr.Textbox(label="Question", value=question)]).launch()