wangzerui commited on
Commit
57e278b
·
1 Parent(s): 268b794
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -47,8 +47,6 @@ def generate_skills(job_description):
47
 
48
  ft_model.eval()
49
  with torch.no_grad():
50
- # Move model to GPU if not already there
51
- ft_model.to("cuda")
52
  output_tokens = ft_model.generate(**model_input, max_new_tokens=200)[0]
53
  generated_text = tokenizer.decode(output_tokens, skip_special_tokens=True)
54
 
@@ -68,4 +66,4 @@ inputs = gr.Textbox(lines=10, label="Job description:", placeholder="Enter or pa
68
  outputs = gr.Textbox(label="Required skills:", placeholder="The required skills will be displayed here...")
69
 
70
  gr.Interface(fn=generate_skills, inputs=inputs, outputs=outputs, title="Job Skills Analysis",
71
- description="Paste the job description in the text box below and the model will show the required skills for candidates.").launch(share=True) # Set share=True to create a public link
 
47
 
48
  ft_model.eval()
49
  with torch.no_grad():
 
 
50
  output_tokens = ft_model.generate(**model_input, max_new_tokens=200)[0]
51
  generated_text = tokenizer.decode(output_tokens, skip_special_tokens=True)
52
 
 
66
  outputs = gr.Textbox(label="Required skills:", placeholder="The required skills will be displayed here...")
67
 
68
  gr.Interface(fn=generate_skills, inputs=inputs, outputs=outputs, title="Job Skills Analysis",
69
+ description="Paste the job description in the text box below and the model will show the required skills for candidates.").launch() # Remove share=True