neuroama commited on
Commit
daef9df
·
1 Parent(s): 7df898d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,16 +1,16 @@
1
  import gradio as gr
2
  import requests
3
 
4
- def download_file(download_url, save_path):
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 {save_path}"
10
  except Exception as e:
11
  return f"Error downloading file: {str(e)}"
12
 
13
- iface = gr.Interface(fn=download_file, inputs=["text", "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"])
 
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"])