Upload app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,11 @@ import numpy as np # type: ignore
|
|
| 3 |
from tensorflow.keras.models import load_model # type: ignore
|
| 4 |
from PIL import Image # type: ignore
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
# Model Load
|
| 7 |
model = load_model("xception_deepfake_image.h5")
|
| 8 |
|
|
|
|
| 3 |
from tensorflow.keras.models import load_model # type: ignore
|
| 4 |
from PIL import Image # type: ignore
|
| 5 |
|
| 6 |
+
import os
|
| 7 |
+
os.system("pip install tensorflow")
|
| 8 |
+
|
| 9 |
+
from tensorflow.keras.models import load_model # type: ignore # Now TensorFlow is installed before importing
|
| 10 |
+
|
| 11 |
# Model Load
|
| 12 |
model = load_model("xception_deepfake_image.h5")
|
| 13 |
|