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") | |
iface.launch(share=True) | |
# subprocess.run(["wget", "-O", "G_38400.pth", "https://github.com/00000000002/render/releases/download/ddd/G_38400.pth"]) | |