Defalt-404 commited on
Commit
73c45d0
1 Parent(s): 95b7fb7

add gunicorn bind

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. server.py +1 -6
Dockerfile CHANGED
@@ -8,4 +8,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
  COPY . .
10
 
11
- CMD ["gunicorn", "-c", "gunicorn_config.py", "server:app"]
 
8
 
9
  COPY . .
10
 
11
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "server:app"]
server.py CHANGED
@@ -28,7 +28,6 @@ def create_app():
28
  app = create_app()
29
 
30
 
31
-
32
  # Function to apply transformation to specific columns
33
  def apply_transformation(row):
34
  transformed_row = []
@@ -53,7 +52,7 @@ def page_not_found(error):
53
  # Route to display transformed CSV as a table
54
  @app.route('/')
55
  def display_transformed_csv():
56
-
57
  access_token = get_secrets('GH_token')
58
  app.secret_key = get_secrets('secret_key')
59
  print(access_token)
@@ -100,8 +99,4 @@ def display_transformed_csv():
100
  return render_template('table.html', data=data, header_row=header_row, active_tab=active_tab)
101
  except FileNotFoundError:
102
  return "CSV file not found."
103
-
104
- app = create_app()
105
- app.secret_key = get_secrets('secret_key')
106
- app.run(debug=True, host='0.0.0.0', port=7860)
107
 
 
28
  app = create_app()
29
 
30
 
 
31
  # Function to apply transformation to specific columns
32
  def apply_transformation(row):
33
  transformed_row = []
 
52
  # Route to display transformed CSV as a table
53
  @app.route('/')
54
  def display_transformed_csv():
55
+ app.secret_key = get_secrets('secret_key')
56
  access_token = get_secrets('GH_token')
57
  app.secret_key = get_secrets('secret_key')
58
  print(access_token)
 
99
  return render_template('table.html', data=data, header_row=header_row, active_tab=active_tab)
100
  except FileNotFoundError:
101
  return "CSV file not found."
 
 
 
 
102