File size: 373 Bytes
b750816
e53ccb9
b750816
e53ccb9
 
 
b750816
9d54dca
b750816
 
 
 
 
 
2a5986c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)