Update app.py
Browse files
app.py
CHANGED
|
@@ -74,15 +74,20 @@ class URLValidator:
|
|
| 74 |
# Initialize validator
|
| 75 |
validator = URLValidator()
|
| 76 |
|
| 77 |
-
st.
|
| 78 |
-
|
| 79 |
-
|
| 80 |
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
| 82 |
if url and query:
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
| 87 |
else:
|
| 88 |
-
st.warning("Please enter both a URL and a search query.")
|
|
|
|
| 74 |
# Initialize validator
|
| 75 |
validator = URLValidator()
|
| 76 |
|
| 77 |
+
st.set_page_config(page_title="URL Credibility Checker", layout="centered")
|
| 78 |
+
st.title("π URL Credibility Checker")
|
| 79 |
+
st.markdown("**Analyze the credibility of a website based on its content, trustworthiness, and relevance.**")
|
| 80 |
|
| 81 |
+
url = st.text_input("π Enter URL")
|
| 82 |
+
query = st.text_input("π Enter Search Query")
|
| 83 |
+
|
| 84 |
+
if st.button("β
Check Credibility"):
|
| 85 |
if url and query:
|
| 86 |
+
with st.spinner("Analyzing credibility..."):
|
| 87 |
+
result = validator.rate_url_validity(query, url)
|
| 88 |
+
st.success("Analysis Complete!")
|
| 89 |
+
st.metric(label="Final Score", value=result["Final Score"])
|
| 90 |
+
st.write("**Star Rating:**", result["Star Rating"])
|
| 91 |
+
st.markdown(f"**π Explanation:** {result['Explanation']}")
|
| 92 |
else:
|
| 93 |
+
st.warning("β οΈ Please enter both a URL and a search query.")
|