Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,11 +28,11 @@ def call_api(url, keyword, wl_key, description_narrative):
|
|
28 |
url = st.text_input("Enter the URL of the webpage:")
|
29 |
query = st.text_input("Enter the query the content aims at ranking for:")
|
30 |
narrative = st.text_area("Enter the descriptive narrative of the searcher:")
|
31 |
-
text = st.text_input("Enter
|
32 |
|
33 |
# Button to execute analysis
|
34 |
if st.button("Analyze"):
|
35 |
-
if url and query and narrative and wl_key:
|
36 |
response = call_api(url, query, wl_key, narrative)
|
37 |
|
38 |
# Display JSON response
|
@@ -62,6 +62,6 @@ if st.button("Analyze"):
|
|
62 |
st.error(f"Error extracting analysis results: {str(e)}")
|
63 |
st.error("Please check the API response format and adapt the code accordingly.")
|
64 |
else:
|
65 |
-
st.warning("Please provide
|
66 |
|
67 |
|
|
|
28 |
url = st.text_input("Enter the URL of the webpage:")
|
29 |
query = st.text_input("Enter the query the content aims at ranking for:")
|
30 |
narrative = st.text_area("Enter the descriptive narrative of the searcher:")
|
31 |
+
text = st.text_input("Enter the text to be analyzed (as alternative to the URL):")
|
32 |
|
33 |
# Button to execute analysis
|
34 |
if st.button("Analyze"):
|
35 |
+
if (url or text) and query and narrative and wl_key:
|
36 |
response = call_api(url, query, wl_key, narrative)
|
37 |
|
38 |
# Display JSON response
|
|
|
62 |
st.error(f"Error extracting analysis results: {str(e)}")
|
63 |
st.error("Please check the API response format and adapt the code accordingly.")
|
64 |
else:
|
65 |
+
st.warning("Please provide either a URL or Text along with other required inputs!")
|
66 |
|
67 |
|