Spaces:
Runtime error
Runtime error
xclasscode
commited on
Commit
·
f1483eb
1
Parent(s):
6801092
Create models.py
Browse files
models.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String,DateTime,Float
|
2 |
+
from datetime import datetime
|
3 |
+
import database
|
4 |
+
|
5 |
+
class SentimentResult(database.Base):
|
6 |
+
|
7 |
+
__tablename__ = "sentiment_results"
|
8 |
+
|
9 |
+
id = Column(Integer, primary_key=True, index=True)
|
10 |
+
text_id = Column(Integer, ForeignKey("textinputs.id"))
|
11 |
+
positive_score = Column(Float)
|
12 |
+
negative_score = Column(Float)
|
13 |
+
neutral_score = Column(Float)
|
14 |
+
created_at = Column(DateTime, default=datetime.utcnow)
|