Spaces:
Runtime error
Runtime error
David
commited on
Commit
·
b635ac3
1
Parent(s):
8d4fa75
use os env instead st secrets
Browse files- .gitignore +1 -0
- app.py +5 -2
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
/.streamlit/*
|
app.py
CHANGED
@@ -73,8 +73,10 @@ def set_entities(sentence, entities):
|
|
73 |
|
74 |
|
75 |
def apply_ner(input_text_message: str):
|
76 |
-
auth_endpoint_token = st.secrets["auth_endpoint_token"]
|
77 |
-
|
|
|
|
|
78 |
|
79 |
headers = {
|
80 |
'Authorization': auth_endpoint_token,
|
@@ -105,3 +107,4 @@ iface = gr.Interface(fn=apply_ner, inputs=gr.inputs.Textbox(lines=5, placeholder
|
|
105 |
label='Check your text for compliance with the NVC rules'),
|
106 |
outputs="html", examples=examples)
|
107 |
iface.launch()
|
|
|
|
73 |
|
74 |
|
75 |
def apply_ner(input_text_message: str):
|
76 |
+
# auth_endpoint_token = st.secrets["auth_endpoint_token"]
|
77 |
+
auth_endpoint_token = os.environ["auth_endpoint_token"]
|
78 |
+
# endpoint_url = st.secrets["endpoint_url"]
|
79 |
+
endpoint_url = os.environ["endpoint_url"]
|
80 |
|
81 |
headers = {
|
82 |
'Authorization': auth_endpoint_token,
|
|
|
107 |
label='Check your text for compliance with the NVC rules'),
|
108 |
outputs="html", examples=examples)
|
109 |
iface.launch()
|
110 |
+
|