MerlenMaven commited on
Commit
24d04ee
·
verified ·
1 Parent(s): cb3bc41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,9 +1,14 @@
1
  import zipfile
2
  import os
3
 
4
- if not os.path.exists("fer"):
5
- with zipfile.ZipFile("fer.zip", "r") as zip_ref:
6
- zip_ref.extractall(".")
 
 
 
 
 
7
 
8
  import gradio as gr
9
  import cv2
 
1
  import zipfile
2
  import os
3
 
4
+ # Path to your ZIP file and extraction directory
5
+ zip_path = "fer.zip" # Ensure the correct path to your ZIP file
6
+ extract_folder = "fer" # Directory where files will be extracted
7
+
8
+ # Check if the extraction folder exists, if not, extract the ZIP file
9
+ if not os.path.exists(extract_folder):
10
+ with zipfile.ZipFile(zip_path, "r") as zip_ref:
11
+ zip_ref.extractall(extract_folder) # Extract to 'fer' directory
12
 
13
  import gradio as gr
14
  import cv2