Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicklesworthstone committed May 30, 2024
1 parent 64266e8 commit 3f35b62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions swiss_army_llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,8 @@ async def compute_transcript_with_whisper_from_audio(
new_temp_file_path = temp_file_path + f".{detected_data_type}"
os.rename(temp_file_path, new_temp_file_path)
temp_file_path = new_temp_file_path
# Create a new UploadFile object using the downloaded file path
file = UploadFile(filename=os.path.basename(temp_file_path), file=open(temp_file_path, 'rb'))
else:
raise HTTPException(status_code=400, detail="Invalid input. Provide either a file or URL with hash and size.")
audio_file_size_mb = os.path.getsize(temp_file_path) / (1024 * 1024)
Expand Down

0 comments on commit 3f35b62

Please sign in to comment.