sekgobela-kevin / natrec

Natrec is an AI tool offering text generation, language translation, creative content writing, and accurate question answering
0 stars 0 forks source link

Project files missing #3

Open sekgobela-kevin opened 10 months ago

sekgobela-kevin commented 10 months ago

Neccessary files including requirements.txt and config.py are absent which are neccassy for ensuring the webapp can run.

sekgobela-kevin commented 10 months ago

This can be used for contents of config.py

import os

class Config():
    # Secret key used to sign cookies and other sensitive data.
    # This should be kept secret and should never be shared with anyone.
    SECRET_KEY = os.environ.get('SECRET_KEY')

    # Connection string to the database. The specific connection string will depend on the type of database that you are using.
    SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI')

    # Controls whether or not the application is in debug mode.
    # In debug mode, the application will log more information and will be easier to debug.
    DEBUG = os.environ.get('DEBUG', False)

    # Type of cache to use. The default cache is the `simple` cache, which is a simple in-memory cache.
    CACHE_TYPE = os.environ.get('CACHE_TYPE', 'simple')

    # Default timeout for cache items. The default timeout is 300 seconds (5 minutes).
    CACHE_DEFAULT_TIMEOUT = os.environ.get('CACHE_DEFAULT_TIMEOUT', 300)

    # Minimum logging level. The default logging level is `INFO`.
    LOGGING_LEVEL = os.environ.get('LOGGING_LEVEL', 'INFO')

class DevelopmentConfig(Config):
    # Enable debug mode in development. 
    DEBUG = True

class ProductionConfig(Config):
    # Disable debug mode in production.
    DEBUG = False

# Map environment names to configuration objects.
config = {
    'development': DevelopmentConfig,
    'production': ProductionConfig
}
sekgobela-kevin commented 10 months ago

The config can be associated with app though.

# Associate the config with the app
app.config.from_object('config.DevelopmentConfig')
sekgobela-kevin commented 10 months ago

The only dependency in front end is flask which needs to be added to requirements.txt

sekgobela-kevin commented 9 months ago

The one file missing is license #4