Skip to content

Commit

Permalink
fix(whisper): No longer include file name for temp file
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyan114 committed Oct 17, 2023
1 parent 015b3fb commit aa082ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extra/whisper/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@

def SaveFileToDisk(url: str) -> str:
# Get the file name
fileName = url.split("/")[-1]
# fileName = url.split("/")[-1]

# Create a temp directory
tempDir = os.path.join(os.getcwd(), "temp")
if not os.path.exists(tempDir):
os.mkdir(tempDir)

# Create a temp file
tempFile = os.path.join(tempDir, str(uuid.uuid4()) + fileName)
tempFile = os.path.join(tempDir, str(uuid.uuid4()))

# Download the file
r = requests.get(url, stream=True)
Expand Down

0 comments on commit aa082ba

Please sign in to comment.