Nina commited on
Commit
dc1d7e6
β€’
1 Parent(s): c1646ce

add textbox for feedback

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -89,6 +89,10 @@ def gen_conv(query: str, report_type, history=[system_template], ipcc=True):
89
  return gradio_format, messages, sources
90
 
91
 
 
 
 
 
92
  # Gradio
93
  css_code = ".gradio-container {background-image: url('file=background.png');background-position: top right}"
94
 
@@ -99,7 +103,7 @@ with gr.Blocks(title="🌍 ClimateGPT Ekimetrics", css=css_code) as demo:
99
  user_id = gr.State([get_random_string(10)])
100
 
101
  with gr.Tab("App"):
102
- gr.Markdown("### Welcome to Climate GPT 🌍 !")
103
  gr.Markdown(
104
  """ Climate GPT is an interactive exploration tool designed to help you easily find relevant information based on of Environmental reports such as IPCCs and other environmental reports.
105
  \n **How does it work:** This Chatbot is a combination of two technologies. FAISS search applied to a vast amount of scientific climate reports and TurboGPT to generate human-like text from the part of the document extracted from the database.
@@ -140,6 +144,9 @@ with gr.Blocks(title="🌍 ClimateGPT Ekimetrics", css=css_code) as demo:
140
  )
141
  with gr.Accordion("Feedbacks", open=False):
142
  gr.Markdown("Please complete some feedbacks πŸ™")
 
 
 
143
 
144
  with gr.Accordion("Add your personal openai api key - Option", open=False):
145
  openai_api_key_textbox = gr.Textbox(
 
89
  return gradio_format, messages, sources
90
 
91
 
92
+ def test(feed: str):
93
+ print(feed)
94
+
95
+
96
  # Gradio
97
  css_code = ".gradio-container {background-image: url('file=background.png');background-position: top right}"
98
 
 
103
  user_id = gr.State([get_random_string(10)])
104
 
105
  with gr.Tab("App"):
106
+ gr.Markdown("# Welcome to Climate GPT 🌍 !")
107
  gr.Markdown(
108
  """ Climate GPT is an interactive exploration tool designed to help you easily find relevant information based on of Environmental reports such as IPCCs and other environmental reports.
109
  \n **How does it work:** This Chatbot is a combination of two technologies. FAISS search applied to a vast amount of scientific climate reports and TurboGPT to generate human-like text from the part of the document extracted from the database.
 
144
  )
145
  with gr.Accordion("Feedbacks", open=False):
146
  gr.Markdown("Please complete some feedbacks πŸ™")
147
+ feedback = gr.Textbox()
148
+ feedback_save = gr.Button(value="submit feedback")
149
+ feedback_save.click(test, inputs=[feedback])
150
 
151
  with gr.Accordion("Add your personal openai api key - Option", open=False):
152
  openai_api_key_textbox = gr.Textbox(