Spaces:
Runtime error
Runtime error
Arthour
commited on
Commit
·
20cd76d
1
Parent(s):
c9ac1af
Dependencies fix
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import hashlib
|
2 |
import logging
|
|
|
3 |
from datetime import datetime
|
4 |
from typing import Dict, Any, List
|
5 |
|
6 |
import gradio as gr
|
7 |
import spacy
|
8 |
-
import streamlit as st
|
9 |
from pony.orm import db_session
|
10 |
from spacy import displacy
|
11 |
|
@@ -83,18 +83,18 @@ class Application:
|
|
83 |
if __name__ == '__main__':
|
84 |
db.bind(
|
85 |
provider='postgres',
|
86 |
-
user=
|
87 |
-
password=
|
88 |
-
host=
|
89 |
-
port=
|
90 |
-
database=
|
91 |
)
|
92 |
db.generate_mapping(create_tables=True)
|
93 |
application = Application(
|
94 |
classificator=Classificator(
|
95 |
config={
|
96 |
-
'auth_endpoint_token':
|
97 |
-
'endpoint_url':
|
98 |
}
|
99 |
),
|
100 |
options={"ents": ["Observation", "Evaluation"], "colors": {"Observation": "#9bddff", "Evaluation": "#f08080"}}
|
|
|
1 |
import hashlib
|
2 |
import logging
|
3 |
+
import os
|
4 |
from datetime import datetime
|
5 |
from typing import Dict, Any, List
|
6 |
|
7 |
import gradio as gr
|
8 |
import spacy
|
|
|
9 |
from pony.orm import db_session
|
10 |
from spacy import displacy
|
11 |
|
|
|
83 |
if __name__ == '__main__':
|
84 |
db.bind(
|
85 |
provider='postgres',
|
86 |
+
user=os.getenv('pg_user'),
|
87 |
+
password=os.getenv('pg_password'),
|
88 |
+
host=os.getenv('pg_host'),
|
89 |
+
port=os.getenv('pg_port'),
|
90 |
+
database=os.getenv('pg_database')
|
91 |
)
|
92 |
db.generate_mapping(create_tables=True)
|
93 |
application = Application(
|
94 |
classificator=Classificator(
|
95 |
config={
|
96 |
+
'auth_endpoint_token': os.getenv("auth_endpoint_token"),
|
97 |
+
'endpoint_url': os.getenv("endpoint_url")
|
98 |
}
|
99 |
),
|
100 |
options={"ents": ["Observation", "Evaluation"], "colors": {"Observation": "#9bddff", "Evaluation": "#f08080"}}
|