Synced repo using 'sync_with_huggingface' Github Action
Browse files
app.py
CHANGED
|
@@ -5,6 +5,8 @@ import os
|
|
| 5 |
from dotenv import load_dotenv
|
| 6 |
import csv
|
| 7 |
from datetime import datetime
|
|
|
|
|
|
|
| 8 |
|
| 9 |
load_dotenv()
|
| 10 |
|
|
@@ -55,6 +57,15 @@ def main():
|
|
| 55 |
st.session_state.result = None
|
| 56 |
|
| 57 |
claim = st.text_area("Enter a claim to verify:", height=150)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
confidence_threshold = st.slider("Confidence Threshold", 0.0, 1.0, 0.5, 0.05)
|
| 59 |
|
| 60 |
if st.button("Verify Claim"):
|
|
|
|
| 5 |
from dotenv import load_dotenv
|
| 6 |
import csv
|
| 7 |
from datetime import datetime
|
| 8 |
+
import pandas as pd
|
| 9 |
+
import random
|
| 10 |
|
| 11 |
load_dotenv()
|
| 12 |
|
|
|
|
| 57 |
st.session_state.result = None
|
| 58 |
|
| 59 |
claim = st.text_area("Enter a claim to verify:", height=150)
|
| 60 |
+
try:
|
| 61 |
+
df = pd.read_csv("data/pib_titles.csv")
|
| 62 |
+
if not df.empty:
|
| 63 |
+
sample_claims = df.sample(2)
|
| 64 |
+
st.markdown("### 🧪 Example Claims from Dataset:")
|
| 65 |
+
for idx, row in sample_claims.iterrows():
|
| 66 |
+
st.markdown(f"- {row[0]}")
|
| 67 |
+
except Exception as e:
|
| 68 |
+
st.warning(f"Could not load example claims: {e}")
|
| 69 |
confidence_threshold = st.slider("Confidence Threshold", 0.0, 1.0, 0.5, 0.05)
|
| 70 |
|
| 71 |
if st.button("Verify Claim"):
|