david-oplatka commited on
Commit
14b1604
·
verified ·
1 Parent(s): 2bc028d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -16
app.py CHANGED
@@ -41,25 +41,12 @@ def respond(message, history):
41
 
42
  cfg.title = f'''<h1 style="text-align: center;">{cfg.title}</h1>'''
43
 
44
- cfg.description = f'''<center> <h2>{cfg.description}</h2>
 
45
  <br>
46
  This demo uses Retrieval Augmented Generation to ask questions about {cfg.source_data_desc}</center>'''
47
 
48
- image_html = '''
49
- <img src="https://github.com/david-oplatka/chatbot-streamlit/blob/main/Vectara-logo.png" style="float:left; width:100px; height:50px; margin-right:20px;">
50
- '''
51
-
52
- # with gr.Blocks() as demo:
53
- # gr.HTML()
54
- # gr.ChatInterface(respond, title = cfg.title, description = cfg.description,
55
- # chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3))
56
-
57
- with gr.Blocks() as demo:
58
- with gr.Row():
59
- gr.HTML(image_html)
60
- gr.HTML(cfg.title)
61
- gr.HTML(cfg.description)
62
- gr.ChatInterface(respond, chatbot=gr.Chatbot(value=[[None, "How may I help you?"]], scale=3))
63
 
64
 
65
  if __name__ == "__main__":
 
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" style="float:left; width:100px; height:50px; margin-right:20px;">
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
+ gr.ChatInterface(respond, title = cfg.title, description = cfg.description, chatbot = gr.Chatbot(value = [[None, "How may I help you?"]], scale=3))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
 
52
  if __name__ == "__main__":