david-oplatka commited on
Commit
44da4e7
·
verified ·
1 Parent(s): 64eaa46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -38,16 +38,15 @@ def respond(message, history):
38
  response = vq.submit_query(message)
39
  yield response
40
 
41
- cfg.title = f'''<head>
42
- <style>
43
  img {{
44
- width: 40%;
45
  }}
46
  table, td {{
47
  border: none;
48
  }}
49
  </style>
50
- </head>
51
  <table>
52
  <tr>
53
  <td> <img src="https://github.com/david-oplatka/chatbot-streamlit/blob/main/Vectara-logo.png?raw=true"> </td>
@@ -55,12 +54,10 @@ cfg.title = f'''<head>
55
  <td> <body>This demo uses Retrieval Augmented Generation to ask questions about {cfg.source_data_desc}</body> </td>
56
  </tr>
57
  </table>
 
58
  '''
59
 
60
 
61
- cfg.description = f'''<center> <h2>{cfg.description}</h2></center>'''
62
-
63
-
64
 
65
 
66
  # cfg.title = f'''<center> <img src="https://github.com/david-oplatka/chatbot-streamlit/blob/main/Vectara-logo.png?raw=true" width="200px" height="40px">
@@ -77,7 +74,7 @@ if cfg.examples:
77
  else:
78
  app_examples = None
79
 
80
- demo = gr.ChatInterface(respond, title = cfg.title, description = cfg.description,
81
  chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3), examples = app_examples)
82
 
83
 
 
38
  response = vq.submit_query(message)
39
  yield response
40
 
41
+
42
+ cfg.description = f'''<style>
43
  img {{
44
+ width: 10%;
45
  }}
46
  table, td {{
47
  border: none;
48
  }}
49
  </style>
 
50
  <table>
51
  <tr>
52
  <td> <img src="https://github.com/david-oplatka/chatbot-streamlit/blob/main/Vectara-logo.png?raw=true"> </td>
 
54
  <td> <body>This demo uses Retrieval Augmented Generation to ask questions about {cfg.source_data_desc}</body> </td>
55
  </tr>
56
  </table>
57
+ <center> <h2>{cfg.description}</h2></center>
58
  '''
59
 
60
 
 
 
 
61
 
62
 
63
  # cfg.title = f'''<center> <img src="https://github.com/david-oplatka/chatbot-streamlit/blob/main/Vectara-logo.png?raw=true" width="200px" height="40px">
 
74
  else:
75
  app_examples = None
76
 
77
+ demo = gr.ChatInterface(respond, description = cfg.description,
78
  chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3), examples = app_examples)
79
 
80