cyberandy commited on
Commit
fabfabe
1 Parent(s): 62cc121

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -55,7 +55,7 @@ st.sidebar.image("logo-wordlift.png")
55
  # Main content
56
  with st.form(key='my_form'):
57
  text_input = st.text_area(label='Enter a statement for fact-checking')
58
- submit_button = st.form_submit_button(label='Check Facts')
59
 
60
  if submit_button and text_input:
61
  api_key = os.environ.get('WL_KEY', 'default_key') # Use a default or handle the case where the key is not set
@@ -74,14 +74,15 @@ if submit_button and text_input:
74
  review_body = inner_json.get("reviewBody", "N/A")
75
 
76
  # Display the results
77
- st.write(f"Claim Reviewed: {claim_reviewed}")
78
  # Display the rating
79
  if rating_value.isdigit():
80
  st.progress(int(rating_value) / 5)
81
  else:
82
  st.write("Rating Value: ", rating_value)
83
  st.write(f"Review Body: {review_body}")
84
- st.json(inner_json) # Display the entire JSON-LD data
 
85
 
86
  else:
87
  st.error("Error in fact-checking: " + api_response['error'])
 
55
  # Main content
56
  with st.form(key='my_form'):
57
  text_input = st.text_area(label='Enter a statement for fact-checking')
58
+ submit_button = st.form_submit_button(label='Check Claim')
59
 
60
  if submit_button and text_input:
61
  api_key = os.environ.get('WL_KEY', 'default_key') # Use a default or handle the case where the key is not set
 
74
  review_body = inner_json.get("reviewBody", "N/A")
75
 
76
  # Display the results
77
+ #st.write(f"Claim Reviewed: {claim_reviewed}")
78
  # Display the rating
79
  if rating_value.isdigit():
80
  st.progress(int(rating_value) / 5)
81
  else:
82
  st.write("Rating Value: ", rating_value)
83
  st.write(f"Review Body: {review_body}")
84
+ with st.expander("Here is the final JSON-LD"):
85
+ st.json(inner_json) # Display the entire JSON-LD data
86
 
87
  else:
88
  st.error("Error in fact-checking: " + api_response['error'])