wop commited on
Commit
1939e34
1 Parent(s): a01cd5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,12 +9,12 @@ headers2 = {"Authorization": "Bearer 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"}
9
 
10
  def query(payload):
11
  response = requests.post(API_URL, headers=headers, json=payload)
12
- return response.json()
13
 
14
  def query2(question, context): # Accept two arguments
15
  payload = {"question": question, "context": context}
16
  response = requests.post(API_URL2, headers=headers2, json=payload)
17
- return response.json()
18
 
19
  iface = gr.Interface(
20
  fn=query2,
 
9
 
10
  def query(payload):
11
  response = requests.post(API_URL, headers=headers, json=payload)
12
+ return response.json()["answer"]
13
 
14
  def query2(question, context): # Accept two arguments
15
  payload = {"question": question, "context": context}
16
  response = requests.post(API_URL2, headers=headers2, json=payload)
17
+ return response.json()["answer"]
18
 
19
  iface = gr.Interface(
20
  fn=query2,