richardr1126 commited on
Commit
cf129e2
·
1 Parent(s): 2153702
Files changed (1) hide show
  1. app-ngrok.py +3 -3
app-ngrok.py CHANGED
@@ -58,8 +58,8 @@ def log_rating_to_firestore(input_message, db_info, temperature, response_text,
58
  if output_id in rated_outputs:
59
  gr.Warning("You've already rated this output!")
60
  return
61
- if not input_message or not db_info or not response_text or not rating:
62
- gr.Info("You haven't asked a question yet! Or the output box is empty.")
63
  return
64
 
65
  rated_outputs.add(output_id)
@@ -161,7 +161,7 @@ with gr.Blocks(theme='gradio/soft') as demo:
161
  <p style="font-size: 12px; text-align: center">⚠️ Should take 30-60s to generate. Please rate the response, it helps a lot.</p>
162
  """)
163
 
164
- output_box = gr.Code(label="Generated SQL", lines=2, interactive=True)
165
 
166
  with gr.Row():
167
  copy_button = gr.Button("📋 Copy SQL", variant="secondary")
 
58
  if output_id in rated_outputs:
59
  gr.Warning("You've already rated this output!")
60
  return
61
+ if not input_message or not response_text or not rating:
62
+ gr.Info("You haven't asked a question yet!")
63
  return
64
 
65
  rated_outputs.add(output_id)
 
161
  <p style="font-size: 12px; text-align: center">⚠️ Should take 30-60s to generate. Please rate the response, it helps a lot.</p>
162
  """)
163
 
164
+ output_box = gr.Code(label="Generated SQL", lines=2, interactive=False)
165
 
166
  with gr.Row():
167
  copy_button = gr.Button("📋 Copy SQL", variant="secondary")