VyLala commited on
Commit
481f757
·
verified ·
1 Parent(s): 5d421a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -26,7 +26,7 @@ with gr.Blocks() as interface:
26
  gr.Markdown("# 🧬 mtDNA Location Classifier (MVP)")
27
  #inputMode = gr.Radio(choices=["Single Accession", "Batch Input"], value="Single Accession", label="Choose Input Mode")
28
  user_email = gr.Textbox(label="📧 Your email (used to track free quota)")
29
- usage_display = gr.Markdown("", visible=False)
30
 
31
  # with gr.Group() as single_input_group:
32
  # single_accession = gr.Textbox(label="Enter Single Accession (e.g., KU131308)")
@@ -75,7 +75,7 @@ with gr.Blocks() as interface:
75
 
76
  nps_question = gr.Markdown("### How likely are you to recommend this tool to a colleague or peer (0 = Not at all, 10 = Definitely)?")
77
  nps_slider = gr.Slider(minimum=0, maximum=10, step=1, label="Your NPS Score (0-10)")
78
- nps_button = gr.Button("Submit NPS")
79
  nps_output = gr.Textbox(label="Thanks for your feedback!")
80
 
81
  download_file = gr.File(label="Download File Here", visible=False, interactive=True)
@@ -298,7 +298,8 @@ with gr.Blocks() as interface:
298
  # )
299
  def submit_nps(email,nps_score):
300
  log_submission_to_gsheet(email,[],nps_score)
301
-
 
302
  def log_submission_to_gsheet(email, samples, nps_score=None):
303
  from datetime import datetime, timezone
304
  import json, os, gspread
 
26
  gr.Markdown("# 🧬 mtDNA Location Classifier (MVP)")
27
  #inputMode = gr.Radio(choices=["Single Accession", "Batch Input"], value="Single Accession", label="Choose Input Mode")
28
  user_email = gr.Textbox(label="📧 Your email (used to track free quota)")
29
+ usage_display = gr.Markdown("", visible=Fals)
30
 
31
  # with gr.Group() as single_input_group:
32
  # single_accession = gr.Textbox(label="Enter Single Accession (e.g., KU131308)")
 
75
 
76
  nps_question = gr.Markdown("### How likely are you to recommend this tool to a colleague or peer (0 = Not at all, 10 = Definitely)?")
77
  nps_slider = gr.Slider(minimum=0, maximum=10, step=1, label="Your NPS Score (0-10)")
78
+ nps_button = gr.Button("Submit")
79
  nps_output = gr.Textbox(label="Thanks for your feedback!")
80
 
81
  download_file = gr.File(label="Download File Here", visible=False, interactive=True)
 
298
  # )
299
  def submit_nps(email,nps_score):
300
  log_submission_to_gsheet(email,[],nps_score)
301
+ #return "✅ Submitted successfully!"
302
+ return nps_output
303
  def log_submission_to_gsheet(email, samples, nps_score=None):
304
  from datetime import datetime, timezone
305
  import json, os, gspread