File size: 634 Bytes
f5b51a2
 
7a38a78
 
 
 
f5b51a2
 
 
7a38a78
 
8b78402
f5b51a2
 
 
 
 
 
7a38a78
f5b51a2
7a38a78
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import streamlit as st
from google.cloud import language_v1
import os

# Read API key if stored as an env variable
api_key = os.environ.get("GOOGLE_API_KEY")

# Your existing function
def sample_analyze_entities(text_content):
    st.write("Debug: Entered sample_analyze_entities")
    # Your existing code here.
    pass

# Streamlit UI
st.title('Google Cloud NLP Entity Analyzer')
user_input = st.text_area('Enter text to analyze', '')

if st.button('Analyze'):
    st.write("Debug: Analyze button clicked")
    if user_input:
        st.write(f"Debug: User input received: {user_input}")
        sample_analyze_entities(user_input)