Docker / main.py
imseldrith's picture
Update main.py
9d54dca
raw
history blame
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)