Spaces:
Sleeping
Sleeping
these integrations could potentially multiply winnings
Browse files- src/app.py +49 -27
src/app.py
CHANGED
|
@@ -292,21 +292,7 @@ def process_speech(audio_data, history):
|
|
| 292 |
return []
|
| 293 |
|
| 294 |
# Build enhanced Gradio interface
|
| 295 |
-
with gr.Blocks(
|
| 296 |
-
theme="default",
|
| 297 |
-
css="""
|
| 298 |
-
* {
|
| 299 |
-
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
|
| 300 |
-
Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
|
| 301 |
-
}
|
| 302 |
-
code, pre {
|
| 303 |
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
| 304 |
-
'Liberation Mono', 'Courier New', monospace;
|
| 305 |
-
}
|
| 306 |
-
""",
|
| 307 |
-
analytics_enabled=True,
|
| 308 |
-
title="MedCode MCP",
|
| 309 |
-
) as demo:
|
| 310 |
gr.Markdown("""
|
| 311 |
# 🏥 Medical Symptom to ICD-10 Code Assistant
|
| 312 |
|
|
@@ -360,18 +346,54 @@ with gr.Blocks(
|
|
| 360 |
type="password",
|
| 361 |
placeholder="sk-..."
|
| 362 |
)
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 375 |
|
| 376 |
# Event handlers
|
| 377 |
clear_btn.click(lambda: None, None, chatbot, queue=False)
|
|
|
|
| 292 |
return []
|
| 293 |
|
| 294 |
# Build enhanced Gradio interface
|
| 295 |
+
with gr.Blocks(theme="default") as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
gr.Markdown("""
|
| 297 |
# 🏥 Medical Symptom to ICD-10 Code Assistant
|
| 298 |
|
|
|
|
| 346 |
type="password",
|
| 347 |
placeholder="sk-..."
|
| 348 |
)
|
| 349 |
+
|
| 350 |
+
with gr.Row():
|
| 351 |
+
with gr.Column():
|
| 352 |
+
modal_key = gr.Textbox(
|
| 353 |
+
label="Modal Labs API Key",
|
| 354 |
+
type="password",
|
| 355 |
+
placeholder="mk-..."
|
| 356 |
+
)
|
| 357 |
+
anthropic_key = gr.Textbox(
|
| 358 |
+
label="Anthropic API Key",
|
| 359 |
+
type="password",
|
| 360 |
+
placeholder="sk-ant-..."
|
| 361 |
+
)
|
| 362 |
+
mistral_key = gr.Textbox(
|
| 363 |
+
label="MistralAI API Key",
|
| 364 |
+
type="password",
|
| 365 |
+
placeholder="..."
|
| 366 |
+
)
|
| 367 |
+
|
| 368 |
+
with gr.Column():
|
| 369 |
+
nebius_key = gr.Textbox(
|
| 370 |
+
label="Nebius API Key",
|
| 371 |
+
type="password",
|
| 372 |
+
placeholder="..."
|
| 373 |
+
)
|
| 374 |
+
hyperbolic_key = gr.Textbox(
|
| 375 |
+
label="Hyperbolic Labs API Key",
|
| 376 |
+
type="password",
|
| 377 |
+
placeholder="hyp-..."
|
| 378 |
+
)
|
| 379 |
+
sambanova_key = gr.Textbox(
|
| 380 |
+
label="SambaNova API Key",
|
| 381 |
+
type="password",
|
| 382 |
+
placeholder="..."
|
| 383 |
+
)
|
| 384 |
+
|
| 385 |
+
with gr.Row():
|
| 386 |
+
model_selector = gr.Dropdown(
|
| 387 |
+
choices=["OpenAI", "Modal", "Anthropic", "MistralAI", "Nebius", "Hyperbolic", "SambaNova"],
|
| 388 |
+
value="OpenAI",
|
| 389 |
+
label="Model Provider"
|
| 390 |
+
)
|
| 391 |
+
temperature = gr.Slider(
|
| 392 |
+
minimum=0,
|
| 393 |
+
maximum=1,
|
| 394 |
+
value=0.7,
|
| 395 |
+
label="Temperature"
|
| 396 |
+
)
|
| 397 |
|
| 398 |
# Event handlers
|
| 399 |
clear_btn.click(lambda: None, None, chatbot, queue=False)
|