Mbonea commited on
Commit
0b8f470
·
1 Parent(s): 39a0fff

returned things to normal

Browse files
App/Transcription/TranscriptionRoutes.py CHANGED
@@ -24,15 +24,8 @@ async def create_file(
24
  ),
25
  ):
26
  # Write the file to disk asynchronously
27
- data = None
28
  try:
29
  async with aiofiles.open(file.filename, "wb") as f:
30
- data = await bot.send_file(
31
- -1001925049183,
32
- file_size=file.size,
33
- caption=file.filename,
34
- file=file,
35
- )
36
  while contents := await file.read(1024 * 1):
37
  await f.write(contents)
38
 
@@ -42,7 +35,12 @@ async def create_file(
42
  await file.close()
43
 
44
  # telegram
45
-
 
 
 
 
 
46
  # celery task
47
  task = transcription_task.delay(file.filename, model)
48
 
 
24
  ),
25
  ):
26
  # Write the file to disk asynchronously
 
27
  try:
28
  async with aiofiles.open(file.filename, "wb") as f:
 
 
 
 
 
 
29
  while contents := await file.read(1024 * 1):
30
  await f.write(contents)
31
 
 
35
  await file.close()
36
 
37
  # telegram
38
+ data = await bot.send_file(
39
+ -1001925049183,
40
+ file_size=file.size,
41
+ caption=file.filename,
42
+ file=f"./{file.filename}",
43
+ )
44
  # celery task
45
  task = transcription_task.delay(file.filename, model)
46