add js=True to client side function
Browse files- callbackmanager.py +6 -6
callbackmanager.py
CHANGED
@@ -891,7 +891,7 @@ with gr.Blocks(theme=cyberpunk_theme) as demo: # Apply the theme here
|
|
891 |
patient_data_output = gr.Textbox(label="Patient Data", lines=10)
|
892 |
|
893 |
# Add button to generate PDF from MeldRx data (No AI)
|
894 |
-
meldrx_pdf_button = gr.Button("Generate PDF from MeldRx Data (No AI)", elem_classes="cyberpunk-button"
|
895 |
meldrx_pdf_status = gr.Textbox(label="PDF Generation Status (No AI)") # Renamed status
|
896 |
meldrx_pdf_download = gr.File(label="Download Generated PDF (No AI)") # Renamed download
|
897 |
|
@@ -1187,10 +1187,10 @@ with gr.Blocks(theme=cyberpunk_theme) as demo: # Apply the theme here
|
|
1187 |
js=True
|
1188 |
)
|
1189 |
analyze_pdf_button.click(
|
1190 |
-
analyze_pdf_file_with_ai, inputs=pdf_file, outputs=pdf_ai_output
|
1191 |
)
|
1192 |
analyze_csv_button.click(
|
1193 |
-
analyze_csv_file_with_ai, inputs=csv_file, outputs=csv_ai_output
|
1194 |
)
|
1195 |
|
1196 |
with gr.Tab(
|
@@ -1198,7 +1198,7 @@ with gr.Blocks(theme=cyberpunk_theme) as demo: # Apply the theme here
|
|
1198 |
): # New Tab for One-Click Discharge Paper with AI, styled
|
1199 |
gr.Markdown("<h2 style='color:#00FFFF; text-shadow: 0 0 3px #00FFFF;'>One-Click Medical Discharge Paper Generation with AI Content</h2>") # Neon Tab Header
|
1200 |
one_click_ai_pdf_button = gr.Button(
|
1201 |
-
"Generate Discharge Paper with AI (One-Click)", elem_classes="cyberpunk-button"
|
1202 |
) # Updated button label and styled
|
1203 |
one_click_ai_pdf_status = gr.Textbox(
|
1204 |
label="Discharge Paper Generation Status (AI)"
|
@@ -1223,7 +1223,7 @@ with gr.Blocks(theme=cyberpunk_theme) as demo: # Apply the theme here
|
|
1223 |
|
1224 |
# Connect refresh button to update dashboard
|
1225 |
refresh_btn.click(
|
1226 |
-
fn=update_dashboard, inputs=None, outputs=dashboard_output
|
1227 |
)
|
1228 |
|
1229 |
# Corrected the button click function name here to `generate_pdf_from_meldrx` (No AI PDF)
|
@@ -1236,7 +1236,7 @@ with gr.Blocks(theme=cyberpunk_theme) as demo: # Apply the theme here
|
|
1236 |
|
1237 |
# Connect patient data updates to dashboard
|
1238 |
patient_data_button.click(
|
1239 |
-
fn=update_dashboard, inputs=None, outputs=dashboard_output
|
1240 |
)
|
1241 |
|
1242 |
# Launch with sharing enabled for public access
|
|
|
891 |
patient_data_output = gr.Textbox(label="Patient Data", lines=10)
|
892 |
|
893 |
# Add button to generate PDF from MeldRx data (No AI)
|
894 |
+
meldrx_pdf_button = gr.Button("Generate PDF from MeldRx Data (No AI)", elem_classes="cyberpunk-button") # Renamed button
|
895 |
meldrx_pdf_status = gr.Textbox(label="PDF Generation Status (No AI)") # Renamed status
|
896 |
meldrx_pdf_download = gr.File(label="Download Generated PDF (No AI)") # Renamed download
|
897 |
|
|
|
1187 |
js=True
|
1188 |
)
|
1189 |
analyze_pdf_button.click(
|
1190 |
+
analyze_pdf_file_with_ai, inputs=pdf_file, outputs=pdf_ai_output
|
1191 |
)
|
1192 |
analyze_csv_button.click(
|
1193 |
+
analyze_csv_file_with_ai, inputs=csv_file, outputs=csv_ai_output
|
1194 |
)
|
1195 |
|
1196 |
with gr.Tab(
|
|
|
1198 |
): # New Tab for One-Click Discharge Paper with AI, styled
|
1199 |
gr.Markdown("<h2 style='color:#00FFFF; text-shadow: 0 0 3px #00FFFF;'>One-Click Medical Discharge Paper Generation with AI Content</h2>") # Neon Tab Header
|
1200 |
one_click_ai_pdf_button = gr.Button(
|
1201 |
+
"Generate Discharge Paper with AI (One-Click)", elem_classes="cyberpunk-button", js=True
|
1202 |
) # Updated button label and styled
|
1203 |
one_click_ai_pdf_status = gr.Textbox(
|
1204 |
label="Discharge Paper Generation Status (AI)"
|
|
|
1223 |
|
1224 |
# Connect refresh button to update dashboard
|
1225 |
refresh_btn.click(
|
1226 |
+
fn=update_dashboard, inputs=None, outputs=dashboard_output
|
1227 |
)
|
1228 |
|
1229 |
# Corrected the button click function name here to `generate_pdf_from_meldrx` (No AI PDF)
|
|
|
1236 |
|
1237 |
# Connect patient data updates to dashboard
|
1238 |
patient_data_button.click(
|
1239 |
+
fn=update_dashboard, inputs=None, outputs=dashboard_output
|
1240 |
)
|
1241 |
|
1242 |
# Launch with sharing enabled for public access
|