fixed runtime error
Browse files- ChitChat/__init__.py +0 -3
- ChitChat/common/utils.py +0 -2
- ChitChat/resources/routes.py +0 -1
- requirements.txt +1 -0
ChitChat/__init__.py
CHANGED
@@ -3,18 +3,15 @@ from flask_sqlalchemy import SQLAlchemy
|
|
3 |
from flask_bcrypt import Bcrypt
|
4 |
from flask_cors import CORS
|
5 |
from ChitChat.config import Config
|
6 |
-
from flask_login import LoginManager
|
7 |
|
8 |
db = SQLAlchemy()
|
9 |
bcrypt = Bcrypt()
|
10 |
-
login_manager = LoginManager()
|
11 |
def create_app(config_class = Config):
|
12 |
app = Flask(__name__)
|
13 |
CORS(app)
|
14 |
app.config.from_object(Config)
|
15 |
db.init_app(app)
|
16 |
bcrypt.init_app(app)
|
17 |
-
login_manager.init_app(app)
|
18 |
|
19 |
from ChitChat.resources.routes import resources
|
20 |
app.register_blueprint(resources)
|
|
|
3 |
from flask_bcrypt import Bcrypt
|
4 |
from flask_cors import CORS
|
5 |
from ChitChat.config import Config
|
|
|
6 |
|
7 |
db = SQLAlchemy()
|
8 |
bcrypt = Bcrypt()
|
|
|
9 |
def create_app(config_class = Config):
|
10 |
app = Flask(__name__)
|
11 |
CORS(app)
|
12 |
app.config.from_object(Config)
|
13 |
db.init_app(app)
|
14 |
bcrypt.init_app(app)
|
|
|
15 |
|
16 |
from ChitChat.resources.routes import resources
|
17 |
app.register_blueprint(resources)
|
ChitChat/common/utils.py
CHANGED
@@ -3,8 +3,6 @@ from transformers import T5Tokenizer, T5ForConditionalGeneration
|
|
3 |
import torch
|
4 |
from flask import current_app
|
5 |
from ChitChat import db
|
6 |
-
from ChitChat.models import User
|
7 |
-
# from flask_login import current_user
|
8 |
|
9 |
|
10 |
small_model_name = 'Th3BossC/DialoGPT-medium-AICLUB_NITC'
|
|
|
3 |
import torch
|
4 |
from flask import current_app
|
5 |
from ChitChat import db
|
|
|
|
|
6 |
|
7 |
|
8 |
small_model_name = 'Th3BossC/DialoGPT-medium-AICLUB_NITC'
|
ChitChat/resources/routes.py
CHANGED
@@ -3,7 +3,6 @@ from flask_restful import Api, Resource
|
|
3 |
from ChitChat.models import User
|
4 |
from ChitChat import bcrypt, db
|
5 |
from ChitChat.common.utils import conversation, complexChat
|
6 |
-
# from flask_login import login_user, logout_user, current_user
|
7 |
|
8 |
resources = Blueprint('resources', __name__)
|
9 |
api = Api(resources)
|
|
|
3 |
from ChitChat.models import User
|
4 |
from ChitChat import bcrypt, db
|
5 |
from ChitChat.common.utils import conversation, complexChat
|
|
|
6 |
|
7 |
resources = Blueprint('resources', __name__)
|
8 |
api = Api(resources)
|
requirements.txt
CHANGED
@@ -9,6 +9,7 @@ filelock==3.12.2
|
|
9 |
Flask==2.3.2
|
10 |
Flask-Bcrypt==1.0.1
|
11 |
Flask-Cors==3.0.10
|
|
|
12 |
Flask-RESTful==0.3.10
|
13 |
Flask-SQLAlchemy==3.0.3
|
14 |
fsspec==2023.6.0
|
|
|
9 |
Flask==2.3.2
|
10 |
Flask-Bcrypt==1.0.1
|
11 |
Flask-Cors==3.0.10
|
12 |
+
Flask-Login==0.6.2
|
13 |
Flask-RESTful==0.3.10
|
14 |
Flask-SQLAlchemy==3.0.3
|
15 |
fsspec==2023.6.0
|