Nawal1420 commited on
Commit
91193cd
·
1 Parent(s): aeae762

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ question_answerer = pipeline("question-answering")
5
+ title = 'Question Answering demo with transformers and gradio'
6
+ context =" The 4.1 rated Aljawhara Restaurant is an expensive Restaurant located at https://www.google.com/maps/place/%D9%85%D8%B7%D8%B9%D9%85+%D8%A7%D9%84%D8%AC%D9%88%D9%87%D8%B1%D8%A9+%D8%A7%D9%84%D8%A8%D8%AE%D8%A7%D8%B1%D9%8A++Aljawhara+restaurant%E2%80%AD/@24.6459837,46.7183125,17z/data=!3m1!4b1!4m5!3m4!1s0x3e2f05f968f67c07:0x3950aec90c0e20f5!8m2!3d24.6459837!4d46.7183125?hl=en.And is open from 8:30AM to 12:30AM on Wednesdays, 8:30AM to 12:30AM on Tuesday, 8:30AM to 12:30AM on Monday, 8:30AM to 12:30AM on Sunday, 8AM to 12:30AM on Saturday, 8:30AM to 12:30AM on Friday, and 8:30AM to 12:30AM on Thursday. It offers Catering, Dessert, takeaway, Delivery, no-contact deliveries , Wheelchair Accessible Entrance ,and kids-frindly. Debit cards are one of the payment methods accepted as forms of payment at Aljawhara Restaurant."
7
+ question ="Location"
8
+ question_answerer = pipeline("question-answering")
9
+
10
+ interface = gr.Interface.from_pipeline(question_answerer,
11
+ title = title,
12
+ theme = "peach",
13
+ examples = [[context, question]]).launch()