Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -810,7 +810,8 @@ def send_mail_with_history(req: gr.Request,chatbot):
|
|
810 |
if req.username:
|
811 |
send_email_with_attachment_mailjet("lakshmivairamani@gmail.com","conversation history" + req.username, chatbot)
|
812 |
|
813 |
-
|
|
|
814 |
# CSS for styling the buttons and other elements
|
815 |
css = """
|
816 |
/* Example of custom button styling */
|
@@ -893,7 +894,7 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
893 |
chatbot = gr.Chatbot(label="Select any of the questions listed above to experience RedmindGPT in action.",elem_classes="chatbot_gpt")
|
894 |
|
895 |
with gr.Row():
|
896 |
-
with gr.Column(scale=
|
897 |
message = gr.Textbox(show_label=False, container=False, placeholder="Please enter your question")
|
898 |
|
899 |
with gr.Row():
|
@@ -904,6 +905,8 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
904 |
button = gr.Button("Submit", elem_id="submit",elem_classes="gr-buttonbig")
|
905 |
# Button to stop the current processing
|
906 |
stop_button = gr.Button("Stop", elem_classes="gr-buttonbig")
|
|
|
|
|
907 |
#gr.ClearButton(message, elem_classes="gr-buttonbig")
|
908 |
|
909 |
stop_button.click(stop_processing, [chatbot],[chatbot])
|
|
|
810 |
if req.username:
|
811 |
send_email_with_attachment_mailjet("lakshmivairamani@gmail.com","conversation history" + req.username, chatbot)
|
812 |
|
813 |
+
def upload_file(filepath):
|
814 |
+
gr.Info("File uploaded")
|
815 |
# CSS for styling the buttons and other elements
|
816 |
css = """
|
817 |
/* Example of custom button styling */
|
|
|
894 |
chatbot = gr.Chatbot(label="Select any of the questions listed above to experience RedmindGPT in action.",elem_classes="chatbot_gpt")
|
895 |
|
896 |
with gr.Row():
|
897 |
+
with gr.Column(scale=1):
|
898 |
message = gr.Textbox(show_label=False, container=False, placeholder="Please enter your question")
|
899 |
|
900 |
with gr.Row():
|
|
|
905 |
button = gr.Button("Submit", elem_id="submit",elem_classes="gr-buttonbig")
|
906 |
# Button to stop the current processing
|
907 |
stop_button = gr.Button("Stop", elem_classes="gr-buttonbig")
|
908 |
+
u = gr.UploadButton("Upload a file", file_count="single")
|
909 |
+
u.upload(upload_file, u)
|
910 |
#gr.ClearButton(message, elem_classes="gr-buttonbig")
|
911 |
|
912 |
stop_button.click(stop_processing, [chatbot],[chatbot])
|