dylanglenister commited on
Commit
a60f448
·
1 Parent(s): 89a41e2

Fixing incorrect import in other routes

Browse files
src/api/routes/audio.py CHANGED
@@ -1,9 +1,9 @@
1
- # api/routes/audio.py
2
 
3
  from fastapi import APIRouter, Depends, File, Form, HTTPException, UploadFile
4
  from fastapi.responses import JSONResponse
5
 
6
- from src.core.state import MedicalState, get_state
7
  from src.services.audio_transcription import (get_supported_formats,
8
  transcribe_audio_bytes,
9
  validate_audio_format)
@@ -15,7 +15,7 @@ router = APIRouter(prefix="/audio", tags=["Audio"])
15
  async def transcribe_audio(
16
  file: UploadFile = File(...),
17
  language_code: str = Form(default="en"),
18
- state: MedicalState = Depends(get_state)
19
  ) -> JSONResponse:
20
  """
21
  Transcribe audio file to text using NVIDIA Riva API.
@@ -105,7 +105,7 @@ async def get_audio_formats() -> JSONResponse:
105
  )
106
 
107
  @router.get("/health")
108
- async def audio_health_check(state: MedicalState = Depends(get_state)) -> JSONResponse:
109
  """
110
  Check if audio transcription service is available.
111
 
 
1
+ # src/api/routes/audio.py
2
 
3
  from fastapi import APIRouter, Depends, File, Form, HTTPException, UploadFile
4
  from fastapi.responses import JSONResponse
5
 
6
+ from src.core.state import AppState, get_state
7
  from src.services.audio_transcription import (get_supported_formats,
8
  transcribe_audio_bytes,
9
  validate_audio_format)
 
15
  async def transcribe_audio(
16
  file: UploadFile = File(...),
17
  language_code: str = Form(default="en"),
18
+ state: AppState = Depends(get_state)
19
  ) -> JSONResponse:
20
  """
21
  Transcribe audio file to text using NVIDIA Riva API.
 
105
  )
106
 
107
  @router.get("/health")
108
+ async def audio_health_check(state: AppState = Depends(get_state)) -> JSONResponse:
109
  """
110
  Check if audio transcription service is available.
111
 
src/api/routes/system.py CHANGED
@@ -1,16 +1,16 @@
1
- # api/routes/system.py
2
 
3
  import time
4
 
5
  from fastapi import APIRouter, Depends
6
 
7
- from src.core.state import MedicalState, get_state
8
  from src.data.connection import Collections
9
 
10
  router = APIRouter(prefix="/system", tags=["System"])
11
 
12
  @router.get("/health")
13
- async def health_check(state: MedicalState = Depends(get_state)):
14
  """Health check endpoint"""
15
  return {
16
  "status": "healthy",
 
1
+ # src/api/routes/system.py
2
 
3
  import time
4
 
5
  from fastapi import APIRouter, Depends
6
 
7
+ from src.core.state import AppState, get_state
8
  from src.data.connection import Collections
9
 
10
  router = APIRouter(prefix="/system", tags=["System"])
11
 
12
  @router.get("/health")
13
+ async def health_check(state: AppState = Depends(get_state)):
14
  """Health check endpoint"""
15
  return {
16
  "status": "healthy",