ofermend commited on
Commit
adf3dc3
1 Parent(s): 8af9c59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -13
app.py CHANGED
@@ -7,23 +7,26 @@ import os
7
  import streamlit as st
8
  from PIL import Image
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  def launch_bot():
11
  def generate_response(question):
12
  response = vq.submit_query(question)
13
  return response
14
-
15
- corpus_ids = str(os.environ['corpus_ids']).split(',')
16
- questions = list(eval(os.environ['examples']))
17
- cfg = OmegaConf.create({
18
- 'customer_id': str(os.environ['customer_id']),
19
- 'corpus_ids': corpus_ids,
20
- 'api_key': str(os.environ['api_key']),
21
- 'title': os.environ['title'],
22
- 'description': os.environ['description'],
23
- 'examples': questions,
24
- 'source_data_desc': os.environ['source_data_desc']
25
- })
26
- vq = VectaraQuery(cfg.api_key, cfg.customer_id, cfg.corpus_ids)
27
  st.set_page_config(page_title=cfg.title, layout="wide")
28
 
29
  # left side content
 
7
  import streamlit as st
8
  from PIL import Image
9
 
10
+ corpus_ids = str(os.environ['corpus_ids']).split(',')
11
+ questions = list(eval(os.environ['examples']))
12
+
13
+ cfg = OmegaConf.create({
14
+ 'customer_id': str(os.environ['customer_id']),
15
+ 'corpus_ids': corpus_ids,
16
+ 'api_key': str(os.environ['api_key']),
17
+ 'title': os.environ['title'],
18
+ 'description': os.environ['description'],
19
+ 'examples': questions,
20
+ 'source_data_desc': os.environ['source_data_desc']
21
+ })
22
+
23
+ vq = VectaraQuery(cfg.api_key, cfg.customer_id, cfg.corpus_ids)
24
+
25
  def launch_bot():
26
  def generate_response(question):
27
  response = vq.submit_query(question)
28
  return response
29
+
 
 
 
 
 
 
 
 
 
 
 
 
30
  st.set_page_config(page_title=cfg.title, layout="wide")
31
 
32
  # left side content