Spaces:
Paused
Paused
Download main.py from imseldrith/Docker: direct link, hf CLI and curl.
- Browser
- Download file 373 Bytes
-
https://huggingface.co/spaces/imseldrith/Docker/resolve/main/main.py
- Command line
-
hf download hf://spaces/imseldrith/Docker/main.py
-
curl -L -o main.py https://huggingface.co/spaces/imseldrith/Docker/resolve/main/main.py
373 Bytes
| import gradio as gr | |
| import shutil, os | |
| # Define the Gradio interface | |
| f = os.getcwd() | |
| pth = f+"/"+"file.zip" | |
| print(pth) | |
| def extract_zip(filename): | |
| shutil.unpack_archive("/home/user/app/file.zip", f) | |
| return "Zip file extracted successfully." | |
| iface = gr.Interface(fn=extract_zip, inputs="text", outputs="text", title="Extract Zip File") | |
| iface.launch(debug=True) |