celise88 commited on
Commit
e54baff
·
1 Parent(s): 644c461

fix find-my-match paths

Browse files
Files changed (3) hide show
  1. Dockerfile +1 -1
  2. main.py +10 -13
  3. templates/find_my_match.html +1 -1
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.10.9
2
  WORKDIR /app
3
  COPY requirements.txt .
4
  RUN pip3 install --no-cache-dir -r requirements.txt
 
1
+ FROM python:3.10
2
  WORKDIR /app
3
  COPY requirements.txt .
4
  RUN pip3 install --no-cache-dir -r requirements.txt
main.py CHANGED
@@ -76,21 +76,18 @@ def render_job_info(request: Request, jobtitle: str = Form(enum=[x for x in onet
76
  ### job neighborhoods ###
77
  @app.get("/explore-job-neighborhoods/", response_class=HTMLResponse)
78
  def render_job_neighborhoods(request: Request):
79
- if 'job_neighborhoods.html' in os.listdir('templates'):
80
- return templates.TemplateResponse('job_neighborhoods.html', context={'request': request})
81
- else:
82
- def format_title(logo, title, subtitle, title_font_size = 28, subtitle_font_size=14):
83
- logo = f'<a href="/" target="_self">{logo}</a>'
84
- subtitle = f'<span style="font-size: {subtitle_font_size}px;">{subtitle}</span>'
85
- title = f'<span style="font-size: {title_font_size}px;">{title}</span>'
86
- return f'{logo}{title}<br>{subtitle}'
87
 
88
- fig = px.scatter(coheredat, x = 'longitude', y = 'latitude', color = 'Category', hover_data = ['Category', 'Title'],
89
- title=format_title("Pathfinder", " Job Neighborhoods: Explore the Map!", "(Generated using Co-here AI's LLM & ONET's Task Statements)"))
90
- fig['layout'].update(height=1000, width=1500, font=dict(family='Courier New, monospace', color='black'))
91
- fig.write_html('templates/job_neighborhoods.html')
92
 
93
- return templates.TemplateResponse('job_neighborhoods.html', context={'request': request})
94
 
95
  ### find my match ###
96
  # get
 
76
  ### job neighborhoods ###
77
  @app.get("/explore-job-neighborhoods/", response_class=HTMLResponse)
78
  def render_job_neighborhoods(request: Request):
79
+ def format_title(logo, title, subtitle, title_font_size = 28, subtitle_font_size=14):
80
+ logo = f'<a href="/" target="_self">{logo}</a>'
81
+ subtitle = f'<span style="font-size: {subtitle_font_size}px;">{subtitle}</span>'
82
+ title = f'<span style="font-size: {title_font_size}px;">{title}</span>'
83
+ return f'{logo}{title}<br>{subtitle}'
 
 
 
84
 
85
+ fig = px.scatter(coheredat, x = 'longitude', y = 'latitude', color = 'Category', hover_data = ['Category', 'Title'],
86
+ title=format_title("Pathfinder", " Job Neighborhoods: Explore the Map!", "(Generated using Co-here AI's LLM & ONET's Task Statements)"))
87
+ fig['layout'].update(height=1000, width=1500, font=dict(family='Courier New, monospace', color='black'))
88
+ fig.write_html('templates/job_neighborhoods.html')
89
 
90
+ return templates.TemplateResponse('job_neighborhoods.html', context={'request': request})
91
 
92
  ### find my match ###
93
  # get
templates/find_my_match.html CHANGED
@@ -21,7 +21,7 @@
21
  <main class="main">
22
  <h1 class="pagetitle">Find my Perfect Match!</h1>
23
  <h2 class="pagesubtitle">We'll help you find the perfect job for you! Upload your resume, CV, or cover letter to get started!</h2>
24
- <form action="" class="upload" method="POST" enctype="multipart/form-data">
25
  <input type="file" name="resume" id="resume" class="upload__file">
26
  <button type="submit" class="form__submit">Submit</button>
27
  <p class="alert">Note: We will not store or use your personal information for anything other than the stated purpose.</p>
 
21
  <main class="main">
22
  <h1 class="pagetitle">Find my Perfect Match!</h1>
23
  <h2 class="pagesubtitle">We'll help you find the perfect job for you! Upload your resume, CV, or cover letter to get started!</h2>
24
+ <form class="upload" method="POST" enctype="multipart/form-data">
25
  <input type="file" name="resume" id="resume" class="upload__file">
26
  <button type="submit" class="form__submit">Submit</button>
27
  <p class="alert">Note: We will not store or use your personal information for anything other than the stated purpose.</p>