Raiff1982 commited on
Commit
126287f
·
verified ·
1 Parent(s): e7e38ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 # Placeholder user ID
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
- # Wrapper for async to sync (Gradio requires sync)
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