added subpath
This commit is contained in:
parent
247c59b800
commit
c156898316
@ -1,9 +1,12 @@
|
|||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from sqlalchemy import create_engine, Column, String, Float, MetaData, Table
|
from sqlalchemy import create_engine, Column, String, Float, MetaData, Table
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
from sqlalchemy.orm import sessionmaker
|
from sqlalchemy.orm import sessionmaker
|
||||||
from article_analyzer import ArticleAnalyzer
|
from article_analyzer import ArticleAnalyzer
|
||||||
|
|
||||||
|
sys.path.append(os.path.join(os.path.dirname(__file__), 'finBERT', 'finbert'))
|
||||||
|
|
||||||
Base = declarative_base()
|
Base = declarative_base()
|
||||||
|
|
||||||
class ArticleAnalysis(Base):
|
class ArticleAnalysis(Base):
|
||||||
@ -35,7 +38,7 @@ if __name__ == "__main__":
|
|||||||
print(f"Parsed {len(html_files)} html files")
|
print(f"Parsed {len(html_files)} html files")
|
||||||
|
|
||||||
Base.metadata.create_all(engine)
|
Base.metadata.create_all(engine)
|
||||||
|
|
||||||
|
|
||||||
for file, content in html_files.items():
|
for file, content in html_files.items():
|
||||||
result = analyzer.classify_article_finbert(content)
|
result = analyzer.classify_article_finbert(content)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user