jamesthong commited on
Commit
a971189
1 Parent(s): 48230d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -102,7 +102,7 @@ def source (radio, source1, source2):
102
  with gr.Blocks() as demo:
103
  vectorstore = gr.State()
104
  with gr.Tab("Setup"):
105
-
106
  with gr.Row():
107
  source1 = gr.Textbox(label="Input website",)
108
  source2 = gr.Files(label="Upload a PDF file", file_count="single", file_types=["pdf"])
@@ -117,10 +117,11 @@ with gr.Blocks() as demo:
117
  with gr.Tab("Chatbot"):
118
  chatbot = gr.Chatbot()
119
  msg = gr.Textbox()
120
- send_btn = gr.Button("Send")
121
- clear = gr.ClearButton([msg, chatbot])
122
- msg.submit(fn=rag_chatbot, inputs=[vectorstore, msg, chatbot], outputs=[msg, chatbot])
123
- send_btn.click(fn=rag_chatbot, inputs=[vectorstore, msg, chatbot], outputs=[msg, chatbot])
 
124
 
125
 
126
  if __name__ == "__main__":
 
102
  with gr.Blocks() as demo:
103
  vectorstore = gr.State()
104
  with gr.Tab("Setup"):
105
+ gr.Markdown("Input a website ULR or upload a PDF file")
106
  with gr.Row():
107
  source1 = gr.Textbox(label="Input website",)
108
  source2 = gr.Files(label="Upload a PDF file", file_count="single", file_types=["pdf"])
 
117
  with gr.Tab("Chatbot"):
118
  chatbot = gr.Chatbot()
119
  msg = gr.Textbox()
120
+ with gr.Row():
121
+ clear = gr.ClearButton([msg, chatbot], icon="https://img.icons8.com/?size=100&id=Xnx8cxDef16O&format=png&color=000000")
122
+ send_btn = gr.Button("Send", variant='primary', icon="https://img.icons8.com/?size=100&id=g8ltXTwIfJ1n&format=png&color=000000")
123
+ msg.submit(fn=rag_chatbot, inputs=[vectorstore, msg, chatbot], outputs=[msg, chatbot])
124
+ send_btn.click(fn=rag_chatbot, inputs=[vectorstore, msg, chatbot], outputs=[msg, chatbot])
125
 
126
 
127
  if __name__ == "__main__":