Spaces:
Runtime error
Runtime error
Arthour
commited on
Commit
·
06881e2
1
Parent(s):
20cd76d
Logs disabled
Browse files
app.py
CHANGED
@@ -47,14 +47,14 @@ class Application:
|
|
47 |
"""
|
48 |
Log the request to the database
|
49 |
"""
|
50 |
-
return Request(
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
)
|
58 |
|
59 |
def render(self, input_text: str, classifications: List[Classification]) -> str:
|
60 |
"""
|
@@ -81,15 +81,15 @@ class Application:
|
|
81 |
|
82 |
|
83 |
if __name__ == '__main__':
|
84 |
-
db.bind(
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
)
|
92 |
-
db.generate_mapping(create_tables=True)
|
93 |
application = Application(
|
94 |
classificator=Classificator(
|
95 |
config={
|
|
|
47 |
"""
|
48 |
Log the request to the database
|
49 |
"""
|
50 |
+
# return Request(
|
51 |
+
# text=input_text,
|
52 |
+
# hash=hashlib.md5(input_text.encode()).hexdigest(),
|
53 |
+
# created_at=datetime.now(),
|
54 |
+
# updated_at=datetime.now(),
|
55 |
+
# rating=0,
|
56 |
+
# result=[c.dict() for c in classifications]
|
57 |
+
# )
|
58 |
|
59 |
def render(self, input_text: str, classifications: List[Classification]) -> str:
|
60 |
"""
|
|
|
81 |
|
82 |
|
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={
|