Krish Patel
commited on
Commit
·
1d660ec
1
Parent(s):
c847237
Edited for png images
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ model = load_model("deepfake_detector.h5")
|
|
13 |
st.set_page_config(page_title="Deepfake Detection System", layout="wide")
|
14 |
|
15 |
def process_image_in_memory(file):
|
16 |
-
image = Image.open(file)
|
17 |
# Convert PIL Image to bytes
|
18 |
img_byte_arr = io.BytesIO()
|
19 |
image.save(img_byte_arr, format='JPEG')
|
|
|
13 |
st.set_page_config(page_title="Deepfake Detection System", layout="wide")
|
14 |
|
15 |
def process_image_in_memory(file):
|
16 |
+
image = Image.open(file).convert("RGB")
|
17 |
# Convert PIL Image to bytes
|
18 |
img_byte_arr = io.BytesIO()
|
19 |
image.save(img_byte_arr, format='JPEG')
|