import gradio as gr import pandas as pd import gspread from google.auth import default import requests import time import json # ... (The rest of your code remains the same) # Define custom CSS styles for the buttons custom_css = """ """ # Set up the Gradio Interface feedback_interface = gr.Interface( fn=feedback_response, inputs=[ gr.Textbox(label="Input Message"), gr.Textbox(label="Additional Comments") ], outputs=[ gr.HTML(label="Feedback (Top Row)", html=custom_css + """
"""), gr.HTML(label="Feedback (Bottom Row)", html=custom_css + """ """) ], title="Beta: Itell Guide Response Bot", description=""" # Introduction This is an interface to test iTELL's guide on the side. Please be aware that responses can take up to 20 seconds # Step by Step Introduction 1. Place a question in the input message textbox 2. Wait roughly 10 ~ 20 seconds for the response and elapsed time to come out on the right 3. After looking at the results, click on the feedback options that best describe the output: Good, Bad, Inappropriate, Informative, Inaccurate, Nonsense 4. After choosing the best option, write down additional comments for more feedback 5. Press submit again and wait for the output to come out again for your feedback to be submitted 6. Once the "Thank you for your feedback. Your response and feedback have been recorded!" message is shown, you are done ** DISCLAIMER: You have to type an input message, click on the feedback buttons, and type in additional comments for your responses to be recorded ** For further questions, contact LEAR Labs! """ ) # Launch the interface feedback_interface.launch()