Jeffgold commited on
Commit
ffe2496
·
1 Parent(s): c358ea4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -82,16 +82,17 @@ def convert_video(video_file, quality, aspect_ratio, video_url, api_key, web3_up
82
 
83
  # Copy the output to a new temporary file that won't be deleted when the
84
  # TemporaryDirectory context manager exits.
85
- output_copy_path = shutil.copy2(output_path, tempfile.gettemp# The previous message was cut off, let's complete it here.
86
 
87
- output_copy_path = shutil.copy2(output_path, tempfile.gettempdir())
88
 
89
- # If the user wants to upload to web3, do that and return the URL.
90
- # Otherwise, just return the local path.
91
- if web3_upload:
92
- return upload_to_web3_storage(api_key, output_copy_path)
93
- else:
94
- return output_copy_path
 
95
 
96
  def main():
97
  video_file = gr.inputs.File(label="Video File", type="file")
 
82
 
83
  # Copy the output to a new temporary file that won't be deleted when the
84
  # TemporaryDirectory context manager exits.
85
+ output_copy_path = shutil.copy2(output_path, tempfile.gettempdir())
86
 
87
+ # Let's complete the code here.
88
 
89
+ ```python
90
+ # If the user wants to upload to web3, do that and return the URL.
91
+ # Otherwise, just return the local path.
92
+ if web3_upload:
93
+ return upload_to_web3_storage(api_key, output_copy_path)
94
+ else:
95
+ return output_copy_path
96
 
97
  def main():
98
  video_file = gr.inputs.File(label="Video File", type="file")