Abs6187 commited on
Commit
e42c93d
·
verified ·
1 Parent(s): 10d107e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -129,18 +129,18 @@ def predict(image: Image.Image, text: str) -> str:
129
  )
130
  predicted_class = torch.sigmoid(classification_output).round().item()
131
 
132
- return "Biased" if predicted_class == 1 else "Unbiased"
133
 
134
  # Gradio Interface
135
  interface = gr.Interface(
136
  fn=predict,
137
  inputs=[
138
- gr.Image(type="pil", label="Upload Image"),
139
- gr.Textbox(lines=2, placeholder="Enter text for classification...", label="Input Text")
140
  ],
141
  outputs=gr.Label(label="Prediction"),
142
- title="Multimodal Bias Classifier",
143
- description="Upload an image and provide a text to classify it as 'Biased' or 'Unbiased'."
144
  )
145
 
146
  interface.launch()
 
129
  )
130
  predicted_class = torch.sigmoid(classification_output).round().item()
131
 
132
+ return "Fake News" if predicted_class == 1 else "Real News"
133
 
134
  # Gradio Interface
135
  interface = gr.Interface(
136
  fn=predict,
137
  inputs=[
138
+ gr.Image(type="pil", label="Upload Related Image"),
139
+ gr.Textbox(lines=2, placeholder="Enter news text for classification...", label="Input Text")
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()