Pranjal12345 commited on
Commit
a3d265e
1 Parent(s): f2021d6
Files changed (1) hide show
  1. main.py +8 -3
main.py CHANGED
@@ -4,6 +4,7 @@
4
  from fastapi import FastAPI
5
  from transformers import WhisperProcessor, WhisperForConditionalGeneration
6
  import librosa
 
7
 
8
  app = FastAPI()
9
 
@@ -25,7 +26,11 @@ def transcribe_audio():
25
  return {"transcription": transcription[0]}
26
 
27
 
28
- if __name__ == "__main__":
29
- import uvicorn
30
- uvicorn.run(app, host="0.0.0.0", port=8000)
 
 
 
 
31
 
 
4
  from fastapi import FastAPI
5
  from transformers import WhisperProcessor, WhisperForConditionalGeneration
6
  import librosa
7
+ import uvicorn
8
 
9
  app = FastAPI()
10
 
 
26
  return {"transcription": transcription[0]}
27
 
28
 
29
+ # if __name__ == "__main__":
30
+ # import uvicorn
31
+ # uvicorn.run(app, host="0.0.0.0", port=8000)
32
+
33
+
34
+ if __name__=='__main__':
35
+ uvicorn.run('main:app', reload=True)
36