AyushS9020 commited on
Commit
d569504
·
verified ·
1 Parent(s): 9a0ef5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -14
app.py CHANGED
@@ -28,20 +28,6 @@ client = Groq(api_key=api_key)
28
  # Initialize FastAPI app
29
  app = FastAPI()
30
 
31
- @app.get('/')
32
- def sap() :
33
-
34
- print('-\LOG : Request on /')
35
-
36
- return 'Hello World'
37
-
38
- @app.get("/test")
39
- def test() :
40
-
41
- print('-\LOG : Request on test')
42
-
43
- return 'Running'
44
-
45
  # Convert audio to text using Groq's API
46
  async def audio_to_text(file: UploadFile):
47
  audio_data = await file.read()
@@ -106,8 +92,11 @@ async def text_to_speech(text, filename="output.wav"):
106
  return audio_buffer
107
 
108
  # Main API endpoint for processing audio
 
109
  @app.post("/processaudio")
110
  async def process_audio(audio_file: UploadFile = File(...)):
 
 
111
  # Convert uploaded audio to text
112
  user_message = await audio_to_text(audio_file)
113
 
 
28
  # Initialize FastAPI app
29
  app = FastAPI()
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  # Convert audio to text using Groq's API
32
  async def audio_to_text(file: UploadFile):
33
  audio_data = await file.read()
 
92
  return audio_buffer
93
 
94
  # Main API endpoint for processing audio
95
+ @app.get('/')
96
  @app.post("/processaudio")
97
  async def process_audio(audio_file: UploadFile = File(...)):
98
+
99
+ print('-\LOG : Request on /')
100
  # Convert uploaded audio to text
101
  user_message = await audio_to_text(audio_file)
102