Spaces:
Paused
Paused
| 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) |