david-oplatka commited on
Commit
9538882
·
verified ·
1 Parent(s): 4a84568

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -17
app.py CHANGED
@@ -39,23 +39,15 @@ def respond(message, history):
39
  response = vq.submit_query(message)
40
  yield response
41
 
42
- cfg.title = f'''<h1 style="text-align: center;">{cfg.title}</h1>'''
43
-
44
- # cfg.description = f'''<img src="https://github.com/david-oplatka/chatbot-streamlit/blob/main/Vectara-logo.png?raw=true" style="float:left; width:240px; height:60px">
45
- # <center> <h2>{cfg.description}</h2>
46
- # <br>
47
- # This demo uses Retrieval Augmented Generation to ask questions about {cfg.source_data_desc}</center>'''
48
-
49
- cfg.description = f'''
50
- <div style="position: relative; text-align: center; padding: 20px 0;">
51
- <img src="https://github.com/david-oplatka/chatbot-streamlit/blob/main/Vectara-logo.png?raw=true"
52
- style="position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 240px; height: 60px;">
53
- <div style="margin: 0 auto; max-width: 600px;">
54
- <h2>{cfg.description}</h2>
55
- <p>This demo uses Retrieval Augmented Generation to ask questions about {cfg.source_data_desc}</p>
56
- </div>
57
- </div>
58
- '''
59
 
60
  demo = gr.ChatInterface(respond, title = cfg.title, description = cfg.description, chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3))
61
 
 
39
  response = vq.submit_query(message)
40
  yield response
41
 
42
+ cfg.title = f'''<img src="https://github.com/david-oplatka/chatbot-streamlit/blob/main/Vectara-logo.png?raw=true" style="float:left; width:240px; height:60px">
43
+ <br>
44
+ <h1 style="text-align: center;">{cfg.title}</h1>
45
+ '''
46
+
47
+ cfg.description = f'''<center> <h2>{cfg.description}</h2>
48
+ <br>
49
+ This demo uses Retrieval Augmented Generation to ask questions about {cfg.source_data_desc}</center>
50
+ '''
 
 
 
 
 
 
 
 
51
 
52
  demo = gr.ChatInterface(respond, title = cfg.title, description = cfg.description, chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3))
53