blazingbunny commited on
Commit
7a38a78
·
1 Parent(s): 91ec098

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -1,10 +1,14 @@
1
- # Import Streamlit
2
  import streamlit as st
3
  from google.cloud import language_v1
 
 
 
 
4
 
5
  # Your existing function
6
  def sample_analyze_entities(text_content):
7
- # Your existing code to analyze entities goes here.
 
8
  pass
9
 
10
  # Streamlit UI
@@ -12,5 +16,7 @@ st.title('Google Cloud NLP Entity Analyzer')
12
  user_input = st.text_area('Enter text to analyze', '')
13
 
14
  if st.button('Analyze'):
 
15
  if user_input:
16
- sample_analyze_entities(user_input)
 
 
 
1
  import streamlit as st
2
  from google.cloud import language_v1
3
+ import os
4
+
5
+ # Read API key if stored as an env variable
6
+ api_key = os.environ.get("GOOGLE_API_KEY")
7
 
8
  # Your existing function
9
  def sample_analyze_entities(text_content):
10
+ st.write("Debug: Entered sample_analyze_entities")
11
+ # Your existing code here.
12
  pass
13
 
14
  # Streamlit UI
 
16
  user_input = st.text_area('Enter text to analyze', '')
17
 
18
  if st.button('Analyze'):
19
+ st.write("Debug: Analyze button clicked")
20
  if user_input:
21
+ st.write(f"Debug: User input received: {user_input}")
22
+ sample_analyze_entities(user_input)