Update app.py
Browse files
app.py
CHANGED
|
@@ -1,16 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import requests
|
| 3 |
|
| 4 |
-
def download_file(download_url
|
| 5 |
try:
|
| 6 |
response = requests.get(download_url)
|
| 7 |
with open(save_path, 'wb') as f:
|
| 8 |
f.write(response.content)
|
| 9 |
-
return f"File downloaded successfully to
|
| 10 |
except Exception as e:
|
| 11 |
return f"Error downloading file: {str(e)}"
|
| 12 |
|
| 13 |
-
iface = gr.Interface(fn=download_file, inputs=["text"
|
| 14 |
iface.launch(share=True)
|
| 15 |
|
| 16 |
# subprocess.run(["wget", "-O", "G_38400.pth", "https://github.com/00000000002/render/releases/download/ddd/G_38400.pth"])
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import requests
|
| 3 |
|
| 4 |
+
def download_file(download_url):
|
| 5 |
try:
|
| 6 |
response = requests.get(download_url)
|
| 7 |
with open(save_path, 'wb') as f:
|
| 8 |
f.write(response.content)
|
| 9 |
+
return f"File downloaded successfully to"
|
| 10 |
except Exception as e:
|
| 11 |
return f"Error downloading file: {str(e)}"
|
| 12 |
|
| 13 |
+
iface = gr.Interface(fn=download_file, inputs=["text"], outputs="text")
|
| 14 |
iface.launch(share=True)
|
| 15 |
|
| 16 |
# subprocess.run(["wget", "-O", "G_38400.pth", "https://github.com/00000000002/render/releases/download/ddd/G_38400.pth"])
|