ElBeh commited on
Commit
3ed07ae
·
verified ·
1 Parent(s): a7878a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -40,13 +40,25 @@ def get_prediction(img):
40
 
41
  models = ['DDPM', 'Glide', 'Latent Diffusion', 'Palette', 'Stable Diffusion', 'VQ Diffusion', 'real', 'unseen_fake']
42
 
43
- local_model_path = snapshot_download(repo_id="ElBeh/ma_basemodel")
44
- model = keras.models.load_model(local_model_path)
45
 
 
 
 
 
 
46
 
47
- st.title("Fake Detection")
48
  st.divider()
49
 
 
 
 
 
 
 
 
50
  st.subheader("Image Preprocessing")
51
  crop = st.toggle("random crop")
52
  compress = st.toggle("jpeg compression")
 
40
 
41
  models = ['DDPM', 'Glide', 'Latent Diffusion', 'Palette', 'Stable Diffusion', 'VQ Diffusion', 'real', 'unseen_fake']
42
 
43
+ st.title("Fake Detection")
44
+ st.divider()
45
 
46
+ st.subheader("Modelvariant")
47
+ variant = st.selectbox(
48
+ "Choose the model",
49
+ ("ResNet50v2-Basemodel", "ResNet50v2-Finetuned"),
50
+ )
51
 
52
+ st.write("You selected model: ", variant)
53
  st.divider()
54
 
55
+ if variant == "ResNet50v2-Basemodel":
56
+ local_model_path = snapshot_download(repo_id="ElBeh/ma_basemodel")
57
+ else:
58
+ local_model_path = snapshot_download(repo_id="ElBeh/ma_finetuned_model")
59
+
60
+ model = keras.models.load_model(local_model_path)
61
+
62
  st.subheader("Image Preprocessing")
63
  crop = st.toggle("random crop")
64
  compress = st.toggle("jpeg compression")