Fariddvp commited on
Commit
7fb3daa
·
verified ·
1 Parent(s): a4cb129

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -22,19 +22,23 @@ def extract_text_from_pdf(pdf_file):
22
 
23
 
24
  def evaluate_all_models(pdf_file, job_description):
25
- gpt_result = evaluate_with_gpt(pdf_file, job_description)
26
- gemma_result = evaluate_with_gemma(pdf_file, job_description)
27
- bloom_result = evaluate_with_bloom(pdf_file, job_description)
28
- jabir_result = evaluate_with_jabir(pdf_file, job_description)
29
  llama_result=evaluate_with_llama(pdf_file, job_description)
30
- return f"GPT-4o Result:\n{gpt_result}\n\nGemma Result:\n{gemma_result}\n\nBloom Result:\n{bloom_result}\n\njabir Result:\n{jabir_result}\n\nllama Result:\n{llam_result}"
 
31
 
32
  iface = gr.Interface(
33
- fn=lambda pdf, jd, model: evaluate_with_gpt(pdf, jd) if model == "GPT-4o" else evaluate_with_gemma(pdf, jd) if model == "Gemma" else evaluate_with_bloom(pdf, jd) if model == "Bloom" else evaluate_with_jabir(pdf, jd) if model == "jabir" else evaluate_all_models(pdf, jd) if model == "llama" else evaluate_all_models(pdf, jd),
 
 
34
  inputs=[
35
  gr.File(label="Upload Resume PDF"),
36
  gr.Textbox(lines=10, label="Job Description"),
37
- gr.Radio(choices=["GPT-4o", "Gemma", "Bloom", "jabir"," llama", "All"], label="Choose Model")
 
38
  ],
39
  outputs="text",
40
  title="Resume Evaluator"
 
22
 
23
 
24
  def evaluate_all_models(pdf_file, job_description):
25
+ # gpt_result = evaluate_with_gpt(pdf_file, job_description)
26
+ # gemma_result = evaluate_with_gemma(pdf_file, job_description)
27
+ # bloom_result = evaluate_with_bloom(pdf_file, job_description)
28
+ # jabir_result = evaluate_with_jabir(pdf_file, job_description)
29
  llama_result=evaluate_with_llama(pdf_file, job_description)
30
+ # return f"GPT-4o Result:\n{gpt_result}\n\nGemma Result:\n{gemma_result}\n\nBloom Result:\n{bloom_result}\n\njabir Result:\n{jabir_result}\n\nllama Result:\n{llam_result}"
31
+ return f"\n\nllama Result:\n{llam_result}"
32
 
33
  iface = gr.Interface(
34
+ # fn=lambda pdf, jd, model: evaluate_with_gpt(pdf, jd) if model == "GPT-4o" else evaluate_with_gemma(pdf, jd) if model == "Gemma" else evaluate_with_bloom(pdf, jd) if model == "Bloom" else evaluate_with_jabir(pdf, jd) if model == "jabir" else evaluate_all_models(pdf, jd) if model == "llama" else evaluate_all_models(pdf, jd),
35
+ fn=lambda pdf, jd, model: if model == "llama" else evaluate_all_models(pdf, jd),
36
+
37
  inputs=[
38
  gr.File(label="Upload Resume PDF"),
39
  gr.Textbox(lines=10, label="Job Description"),
40
+ # gr.Radio(choices=["GPT-4o", "Gemma", "Bloom", "jabir"," llama", "All"], label="Choose Model")
41
+ gr.Radio(choices=["llama"], label="Choose Model")
42
  ],
43
  outputs="text",
44
  title="Resume Evaluator"