Spaces:
Build error
Build error
Commit
·
253188c
1
Parent(s):
7a38a78
Update app.py
Browse files
app.py
CHANGED
@@ -1,22 +1,12 @@
|
|
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 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
st.write(f"Debug: User input received: {user_input}")
|
22 |
-
sample_analyze_entities(user_input)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
def sample_analyze_entities(text_content):
|
2 |
st.write("Debug: Entered sample_analyze_entities")
|
3 |
+
try:
|
4 |
+
# Your existing code to analyze entities goes here.
|
5 |
+
# For example, making an API call:
|
6 |
+
st.write("Debug: Making API call...")
|
7 |
+
# response = your_api_call_here(text_content)
|
8 |
+
st.write("Debug: API call completed.")
|
9 |
+
# Process the response and display output
|
10 |
+
# st.write(response)
|
11 |
+
except Exception as e:
|
12 |
+
st.write(f"Debug: An error occurred: {e}")
|
|
|
|