nikhedward commited on
Commit
2791272
1 Parent(s): 594ecf0

Update app.py

Browse files

Added context 3

Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -15,7 +15,7 @@ Reservations for Mr. Valeo have been made at Hyatt hotel November 11 - 15. Ambas
15
  Ambassador would also like invite Mr. Valeo to dinner he is giving November 12 in honor archbishop sin, who is new and impressive figure on Philippine national scene. Guests will be prominent clerical and lay leaders of church who can give Mr. Valeo interesting perspective on their current outlook. Requested briefings will be arranged at embassy on November 12. Please advise if Mr. Valeo has other program interests, he wishes us to arrange in advance his arrival. As Mr. Valeo probably knows, Mrs. Marcos, governor
16
 
17
  """
18
- question1 = "When is the Hyatt Hotel reservation?"
19
 
20
  context2 = """
21
  Subject: Travel of Charles Engelhardt, Sikorsky rep.
@@ -23,10 +23,16 @@ Mr. Charles Engelhardt of Sikorsky aircraft will be visiting your posts during t
23
  """
24
  question2 = "When is the Khartoum reservation?"
25
 
 
 
 
 
26
 
 
 
27
 
28
  key = "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"
29
- generator1 = gr.Interface.load(
30
  "huggingface/" + "deepset/tinyroberta-squad2",
31
  theme="dark-peach",
32
  api_key = key,
@@ -37,19 +43,6 @@ generator1 = gr.Interface.load(
37
  description=desc,
38
  title=title
39
  )
40
-
41
- generator2 = gr.Interface.load(
42
- "huggingface/" + "deepset/xlm-roberta-base-squad2",
43
- theme="dark-peach",
44
- api_key = key,
45
- examples = [[context1, question1],[context2, question2]],
46
- css=".footer{display:none !important}",
47
- #inputs=[gr.Textbox(lines=7, default=context1, label="Context"), gr.inputs.Textbox(lines=2, default=question1, label="Question")],
48
- #outputs=[gr.Textbox(label="Answer"),gr.outputs.Textbox(label="Score")],
49
- description=desc,
50
- title=title
51
 
52
-
53
- gr.Parallel(generator1, generator2).launch()
54
-
55
- #demo.launch()
 
15
  Ambassador would also like invite Mr. Valeo to dinner he is giving November 12 in honor archbishop sin, who is new and impressive figure on Philippine national scene. Guests will be prominent clerical and lay leaders of church who can give Mr. Valeo interesting perspective on their current outlook. Requested briefings will be arranged at embassy on November 12. Please advise if Mr. Valeo has other program interests, he wishes us to arrange in advance his arrival. As Mr. Valeo probably knows, Mrs. Marcos, governor
16
 
17
  """
18
+ question1 = "When is the Hyattt Hotel reservation?"
19
 
20
  context2 = """
21
  Subject: Travel of Charles Engelhardt, Sikorsky rep.
 
23
  """
24
  question2 = "When is the Khartoum reservation?"
25
 
26
+ context3 = """
27
+ Subject: Travel of UN official
28
+ Mr. Roland de Lagerie, P-5 chief of UN office Geneva secretariat recruitment and training, will be in New York for consultations with UN HQS 11 through 15 November 1974. His schedule will not permit him to travel to Washington to visit the department (as suggested by Kevin Carroll), but he said he would be happy to meet with our officers in New York. Those who wish to see de Lagerie can reach him through the office of Mr. Bob Webb, director division of recruitment.
29
+ Although his hands appear tied by superiors in New York, and he therefore does not want his name involved, de Lagerie would appreciate anything that could be done to streamline procedures for submission of requests for executive order 10422 clearances. Mission would be pleased to forward forms direct to csc (as is case for every other UNOG in Geneva), but UNOG is obliged send them to New York which has caused unnecessary delays and problems.
30
 
31
+ """
32
+ question3 = "Who is Bob Web?"
33
 
34
  key = "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"
35
+ demo= gr.Interface.load(
36
  "huggingface/" + "deepset/tinyroberta-squad2",
37
  theme="dark-peach",
38
  api_key = key,
 
43
  description=desc,
44
  title=title
45
  )
46
+
 
 
 
 
 
 
 
 
 
 
47
 
48
+ demo.launch()