cyberandy commited on
Commit
1c727cf
·
1 Parent(s): ce5adfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
2
  import requests, json
3
 
4
  secret_key = st.secrets["secret_key"]
 
5
 
6
  def call_api(url, keyword, wl_key, description_narrative):
7
  api_url = "https://wl-quality-rating.eastus2.inference.ml.azure.com/score"
@@ -26,12 +27,11 @@ def call_api(url, keyword, wl_key, description_narrative):
26
  url = st.text_input("Enter the URL of the webpage:")
27
  query = st.text_input("Enter the query the content aims at ranking for:")
28
  narrative = st.text_area("Enter the descriptive narrative of the searcher:")
29
- wordlift_key = st.text_input("Enter the WordLift Key:")
30
 
31
  # Button to execute analysis
32
  if st.button("Analyze"):
33
- if url and query and narrative and wordlift_key:
34
- response = call_api(url, query, wordlift_key, narrative)
35
 
36
  # Display JSON response
37
  st.json(response)
 
2
  import requests, json
3
 
4
  secret_key = st.secrets["secret_key"]
5
+ wl_key = st.secrets["wl_key"]
6
 
7
  def call_api(url, keyword, wl_key, description_narrative):
8
  api_url = "https://wl-quality-rating.eastus2.inference.ml.azure.com/score"
 
27
  url = st.text_input("Enter the URL of the webpage:")
28
  query = st.text_input("Enter the query the content aims at ranking for:")
29
  narrative = st.text_area("Enter the descriptive narrative of the searcher:")
 
30
 
31
  # Button to execute analysis
32
  if st.button("Analyze"):
33
+ if url and query and narrative and wl_key:
34
+ response = call_api(url, query, wl_key, narrative)
35
 
36
  # Display JSON response
37
  st.json(response)