Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -149,22 +149,41 @@ if "text_result" in st.session_state:
|
|
149 |
for name, link in st.session_state["text_verification"]:
|
150 |
st.markdown(f"[π {name}]({link})")
|
151 |
|
152 |
-
# πΉ Image Result
|
153 |
if "image_result" in st.session_state:
|
154 |
st.image(st.session_state["news_image"], caption="Uploaded Image", use_column_width=True)
|
155 |
-
|
156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
|
158 |
# πΉ Video Result
|
159 |
if "video_result" in st.session_state:
|
160 |
st.video(st.session_state["video_url"])
|
|
|
161 |
if st.session_state["video_result"] == "Fake":
|
162 |
st.error(f"β **This video is Fake!** (Accuracy: {st.session_state['video_accuracy']}%)")
|
163 |
elif st.session_state["video_result"] == "Real":
|
164 |
st.success(f"β
**This video is Real!** (Accuracy: {st.session_state['video_accuracy']}%)")
|
165 |
else:
|
166 |
st.warning("β οΈ Unable to verify the authenticity of this video.")
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
149 |
for name, link in st.session_state["text_verification"]:
|
150 |
st.markdown(f"[π {name}]({link})")
|
151 |
|
152 |
+
# πΉ Image Analysis Result Section
|
153 |
if "image_result" in st.session_state:
|
154 |
st.image(st.session_state["news_image"], caption="Uploaded Image", use_column_width=True)
|
155 |
+
|
156 |
+
if st.session_state["image_result"] == "Fake":
|
157 |
+
st.error(f"β **This image is likely Fake!** (Accuracy: {st.session_state['image_accuracy']}%)")
|
158 |
+
elif st.session_state["image_result"] == "Real":
|
159 |
+
st.success(f"β
**This image is likely Real!** (Accuracy: {st.session_state['image_accuracy']}%)")
|
160 |
+
else:
|
161 |
+
st.warning("β οΈ Unable to verify the authenticity of this image.")
|
162 |
+
|
163 |
+
# β
Add verification links
|
164 |
+
if st.session_state["image_verification"]:
|
165 |
+
st.subheader("π Trusted Fact-Checking Sources")
|
166 |
+
for name, link in st.session_state["image_verification"]:
|
167 |
+
st.markdown(f"[π {name}]({link})")
|
168 |
+
else:
|
169 |
+
st.warning("No verification sources available for this image.")
|
170 |
|
171 |
# πΉ Video Result
|
172 |
if "video_result" in st.session_state:
|
173 |
st.video(st.session_state["video_url"])
|
174 |
+
|
175 |
if st.session_state["video_result"] == "Fake":
|
176 |
st.error(f"β **This video is Fake!** (Accuracy: {st.session_state['video_accuracy']}%)")
|
177 |
elif st.session_state["video_result"] == "Real":
|
178 |
st.success(f"β
**This video is Real!** (Accuracy: {st.session_state['video_accuracy']}%)")
|
179 |
else:
|
180 |
st.warning("β οΈ Unable to verify the authenticity of this video.")
|
181 |
+
|
182 |
+
# β
Check if verification links exist before iterating
|
183 |
+
if st.session_state["video_verification"]:
|
184 |
+
st.subheader("π Trusted Fact-Checking Sources")
|
185 |
+
for name, link in st.session_state["video_verification"]:
|
186 |
+
st.markdown(f"[π {name}]({link})")
|
187 |
+
else:
|
188 |
+
st.warning("No verification sources available for this video.")
|
189 |
+
|