Tonic commited on
Commit
669864f
·
unverified ·
1 Parent(s): c402162

revert function

Browse files
Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -395,27 +395,27 @@ with gr.Blocks(theme=cyberpunk_theme) as demo: # Apply the theme here
395
  analyze_csv_file_with_ai, inputs=csv_file, outputs=csv_ai_output
396
  )
397
 
398
- with gr.Tab("One-Click Discharge Paper (AI)", elem_classes="cyberpunk-tab"):
399
- gr.Markdown("<h2 style='color:#00FFFF; text-shadow: 0 0 3px #00FFFF;'>One-Click Medical Discharge Summary with AI Content</h2>")
400
- with gr.Row():
401
- patient_id_input = gr.Textbox(label="Patient ID (Optional)", placeholder="Enter Patient ID")
402
- first_name_input = gr.Textbox(label="First Name (Optional)", placeholder="Enter First Name")
403
- last_name_input = gr.Textbox(label="Last Name (Optional)", placeholder="Enter Last Name")
404
- one_click_ai_button = gr.Button(
405
- "Generate Discharge Summary with AI (One-Click)", elem_classes="cyberpunk-button"
406
- )
407
- one_click_ai_output = gr.Textbox(
408
- label="AI-Generated Discharge Summary",
409
- lines=20,
410
- placeholder="Discharge summary will appear here..."
411
- )
412
-
413
- # Initialize MeldRxAPI (ensure client_id, client_secret, workspace_id are set in environment variables)
414
- client_id = os.getenv("APPID")
415
- client_secret = os.getenv("CLIENT_SECRET") # Optional, set if required
416
- workspace_id = os.getenv("WORKSPACE_URL")
417
- redirect_uri = "https://multitransformer-discharge-guard.hf.space/callback"
418
- meldrx_api = MeldRxAPI(client_id, client_secret, workspace_id, redirect_uri)
419
 
420
  one_click_ai_button.click(
421
  fn=lambda pid, fname, lname: generate_discharge_paper_one_click(meldrx_api, pid, fname, lname),
 
395
  analyze_csv_file_with_ai, inputs=csv_file, outputs=csv_ai_output
396
  )
397
 
398
+ with gr.Tab("One-Click Discharge Paper (AI)", elem_classes="cyberpunk-tab"):
399
+ gr.Markdown("<h2 style='color:#00FFFF; text-shadow: 0 0 3px #00FFFF;'>One-Click Medical Discharge Summary with AI Content</h2>")
400
+ with gr.Row():
401
+ patient_id_input = gr.Textbox(label="Patient ID (Optional)", placeholder="Enter Patient ID")
402
+ first_name_input = gr.Textbox(label="First Name (Optional)", placeholder="Enter First Name")
403
+ last_name_input = gr.Textbox(label="Last Name (Optional)", placeholder="Enter Last Name")
404
+ one_click_ai_button = gr.Button("Generate Discharge Summary with AI (One-Click)", elem_classes="cyberpunk-button")
405
+ one_click_ai_output = gr.Textbox(label="AI-Generated Discharge Summary", lines=20, placeholder="Discharge summary will appear here...")
406
+
407
+ # Initialize MeldRxAPI (ensure client_id, client_secret, workspace_id are set in environment variables)
408
+ client_id = os.getenv("APPID")
409
+ client_secret = os.getenv("CLIENT_SECRET")
410
+ workspace_id = os.getenv("WORKSPACE_URL")
411
+ redirect_uri = "https://multitransformer-discharge-guard.hf.space/callback"
412
+ meldrx_api = MeldRxAPI(client_id, client_secret, workspace_id, redirect_uri)
413
+
414
+ one_click_ai_button.click(
415
+ fn=lambda pid, fname, lname: generate_discharge_paper_one_click(meldrx_api, pid, fname, lname),
416
+ inputs=[patient_id_input, first_name_input, last_name_input],
417
+ outputs=one_click_ai_output,
418
+ )
419
 
420
  one_click_ai_button.click(
421
  fn=lambda pid, fname, lname: generate_discharge_paper_one_click(meldrx_api, pid, fname, lname),