traversaal-ai commited on
Commit
7c3e247
1 Parent(s): c2ee5cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -11,10 +11,6 @@ headers = {
11
  "content-type": "application/json"
12
  }
13
 
14
- st.title('Ares Demo')
15
-
16
- st.text_input(label, value="", max_chars=None, key=None, type="default", help=None, autocomplete=None, on_change=None, args=None, kwargs=None, *, placeholder=None, disabled=False, label_visibility="visible")
17
-
18
  def inference(query):
19
  payload = { "query": [query] }
20
  response = requests.post(url, json=payload, headers=headers)
@@ -22,4 +18,12 @@ def inference(query):
22
  urls=response.json().get('data').get('web_url')
23
  return response_text, urls
24
 
 
 
 
 
 
 
 
 
25
 
 
11
  "content-type": "application/json"
12
  }
13
 
 
 
 
 
14
  def inference(query):
15
  payload = { "query": [query] }
16
  response = requests.post(url, json=payload, headers=headers)
 
18
  urls=response.json().get('data').get('web_url')
19
  return response_text, urls
20
 
21
+ st.title('Ares Demo')
22
+
23
+ query = st.text_input('Movie title', 'Best taco spots in San Francisco')
24
+
25
+ response_text,urls = inference(query)
26
+
27
+ st.write('Query Result', response_text)
28
+ st.write('Sources',urls)
29