PhyllisPeh commited on
Commit
1f139cb
·
1 Parent(s): ffd8b45

fixed building issues

Browse files
Files changed (2) hide show
  1. app.py +6 -5
  2. requirements.txt +2 -4
app.py CHANGED
@@ -26,14 +26,15 @@ import redis
26
  from flask_session import Session
27
 
28
  app = Flask(__name__)
29
- # Configure Redis for session storage
30
- app.config['SESSION_TYPE'] = 'redis'
31
- app.config['SESSION_REDIS'] = redis.from_url(os.getenv('REDIS_URL', 'redis://localhost:6379'))
32
- app.config['SESSION_KEY_PREFIX'] = 'patent_explorer:'
33
  app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(minutes=30)
34
  app.secret_key = os.getenv('FLASK_SECRET_KEY') or os.urandom(24)
35
 
36
- # Initialize Flask-Session
 
 
 
37
  Session(app)
38
 
39
  # Get API keys from environment variables
 
26
  from flask_session import Session
27
 
28
  app = Flask(__name__)
29
+ # Use filesystem session instead of Redis
30
+ app.config['SESSION_TYPE'] = 'filesystem'
 
 
31
  app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(minutes=30)
32
  app.secret_key = os.getenv('FLASK_SECRET_KEY') or os.urandom(24)
33
 
34
+ # Create sessions directory if it doesn't exist
35
+ if not os.path.exists('flask_session'):
36
+ os.makedirs('flask_session')
37
+
38
  Session(app)
39
 
40
  # Get API keys from environment variables
requirements.txt CHANGED
@@ -1,7 +1,5 @@
1
  # filepath: c:\Users\Phyllis\PatentExplorerApp\requirements.txt
2
- flask>=2.0.0
3
- flask-session>=0.5.0
4
- redis>=4.0.0
5
  Werkzeug==2.0.3
6
  python-dotenv==0.19.0
7
  requests==2.26.0
@@ -11,5 +9,5 @@ pandas==2.0.3
11
  umap-learn==0.5.3
12
  plotly==5.3.1
13
  scikit-learn==1.3.0
14
- hdbscan
15
  reportlab==4.0.4
 
1
  # filepath: c:\Users\Phyllis\PatentExplorerApp\requirements.txt
2
+ flask==2.0.3
 
 
3
  Werkzeug==2.0.3
4
  python-dotenv==0.19.0
5
  requests==2.26.0
 
9
  umap-learn==0.5.3
10
  plotly==5.3.1
11
  scikit-learn==1.3.0
12
+ hdbscan==0.8.40
13
  reportlab==4.0.4