Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
import json
|
|
|
4 |
|
5 |
# Define fact_check_statement function here...
|
6 |
def fact_check_statement(query, api_key):
|
@@ -52,7 +53,7 @@ with st.form(key='my_form'):
|
|
52 |
submit_button = st.form_submit_button(label='Check Facts')
|
53 |
|
54 |
if submit_button and text_input:
|
55 |
-
api_key =
|
56 |
api_response = fact_check_statement(text_input, api_key)
|
57 |
|
58 |
if "error" not in api_response:
|
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
import json
|
4 |
+
import os
|
5 |
|
6 |
# Define fact_check_statement function here...
|
7 |
def fact_check_statement(query, api_key):
|
|
|
53 |
submit_button = st.form_submit_button(label='Check Facts')
|
54 |
|
55 |
if submit_button and text_input:
|
56 |
+
api_key = os.environ.get('WL_KEY', 'default_key') # Use a default or handle the case where the key is not set
|
57 |
api_response = fact_check_statement(text_input, api_key)
|
58 |
|
59 |
if "error" not in api_response:
|