Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from AICoreAGIX_with_TB import AICoreAGIX
|
|
5 |
ai_core = AICoreAGIX()
|
6 |
|
7 |
async def diagnose_tb(image_file, audio_file):
|
8 |
-
user_id = 1 #
|
9 |
result = await ai_core.run_tb_diagnostics(image_file.name, audio_file.name, user_id)
|
10 |
return (
|
11 |
f"**TB Risk Level:** {result['tb_risk']}\n\n"
|
@@ -17,7 +17,7 @@ async def diagnose_tb(image_file, audio_file):
|
|
17 |
f"**Explanation:** {result['explanation']}"
|
18 |
)
|
19 |
|
20 |
-
#
|
21 |
def sync_diagnose_tb(image_file, audio_file):
|
22 |
return asyncio.run(diagnose_tb(image_file, audio_file))
|
23 |
|
|
|
5 |
ai_core = AICoreAGIX()
|
6 |
|
7 |
async def diagnose_tb(image_file, audio_file):
|
8 |
+
user_id = 1 # Example user
|
9 |
result = await ai_core.run_tb_diagnostics(image_file.name, audio_file.name, user_id)
|
10 |
return (
|
11 |
f"**TB Risk Level:** {result['tb_risk']}\n\n"
|
|
|
17 |
f"**Explanation:** {result['explanation']}"
|
18 |
)
|
19 |
|
20 |
+
# Async wrapper for Gradio
|
21 |
def sync_diagnose_tb(image_file, audio_file):
|
22 |
return asyncio.run(diagnose_tb(image_file, audio_file))
|
23 |
|