Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -131,6 +131,16 @@ def predict(image: Image.Image, text: str) -> str:
|
|
131 |
|
132 |
return "Fake News" if predicted_class == 1 else "Real News"
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
# Gradio Interface
|
135 |
interface = gr.Interface(
|
136 |
fn=predict,
|
@@ -140,7 +150,8 @@ interface = gr.Interface(
|
|
140 |
],
|
141 |
outputs=gr.Label(label="Prediction"),
|
142 |
title="Fake News Detector",
|
143 |
-
description="Upload an image and provide text to classify the news as 'Fake' or 'Real'."
|
|
|
144 |
)
|
145 |
|
146 |
interface.launch()
|
|
|
131 |
|
132 |
return "Fake News" if predicted_class == 1 else "Real News"
|
133 |
|
134 |
+
# Custom Theme
|
135 |
+
theme = gr.themes.Base(
|
136 |
+
primary_hue="slate",
|
137 |
+
secondary_hue="blue",
|
138 |
+
neutral_hue="gray",
|
139 |
+
text_size="lg",
|
140 |
+
radius_size="md",
|
141 |
+
font=["Roboto", "sans-serif"]
|
142 |
+
)
|
143 |
+
|
144 |
# Gradio Interface
|
145 |
interface = gr.Interface(
|
146 |
fn=predict,
|
|
|
150 |
],
|
151 |
outputs=gr.Label(label="Prediction"),
|
152 |
title="Fake News Detector",
|
153 |
+
description="Upload an image and provide text to classify the news as 'Fake' or 'Real'.",
|
154 |
+
theme=theme
|
155 |
)
|
156 |
|
157 |
interface.launch()
|