File size: 707 Bytes
529d20c
8489786
529d20c
8489786
 
 
 
 
 
 
 
0becee4
8489786
 
 
 
0becee4
8489786
47afa67
d6f0faf
bec374d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import gradio as gr
import requests

def download_file(download_url, save_path):
    try:
        response = requests.get(download_url)
        with open(save_path, 'wb') as f:
            f.write(response.content)
        return f"File downloaded successfully to {save_path}"
    except Exception as e:
        return f"Error downloading file: {str(e)}"

iface = gr.Interface(fn=download_file, inputs=["text", "text"], outputs="text",
                     inputs_label=["Download URL", "Save Path"],
                     outputs_label="Download Status")
iface.launch(share=True)

# subprocess.run(["wget", "-O", "G_38400.pth", "https://github.com/00000000002/render/releases/download/ddd/G_38400.pth"])