cdcvd commited on
Commit
03ab049
1 Parent(s): 24f2b6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
  import fitz # PyMuPDF
3
- from models import evaluate_with_gpt, evaluate_with_gemma, evaluate_with_bloom, evaluate_with_jabir, evaluate_with_llama
4
 
5
  def extract_text_from_pdf(pdf_file):
6
  document = fitz.open(pdf_file)
@@ -17,9 +17,12 @@ def evaluate_all_models(pdf_file, job_description):
17
  bloom_result = evaluate_with_bloom(resume_text, job_description)
18
  jabir_result = evaluate_with_jabir(resume_text, job_description)
19
  llama_result = evaluate_with_llama(resume_text, job_description)
20
- 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{llama_result}"
 
 
 
21
  import gradio as gr
22
- from models import evaluate_with_gpt, evaluate_with_gemma, evaluate_with_bloom, evaluate_with_jabir, evaluate_with_llama
23
 
24
  def evaluate_multiple_resumes(resume_texts, job_description, model):
25
  results = []
@@ -34,13 +37,16 @@ def evaluate_multiple_resumes(resume_texts, job_description, model):
34
  result = evaluate_with_jabir(resume_text, job_description)
35
  elif model == "llama":
36
  result = evaluate_with_llama(resume_text, job_description)
 
 
37
  else:
38
  gpt_result = evaluate_with_gpt(resume_text, job_description)
39
  gemma_result = evaluate_with_gemma(resume_text, job_description)
40
  bloom_result = evaluate_with_bloom(resume_text, job_description)
41
  jabir_result = evaluate_with_jabir(resume_text, job_description)
42
  llama_result = evaluate_with_llama(resume_text, job_description)
43
- result = 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{llama_result}"
 
44
  results.append(f"Result for Resume:\n{result}\n\n")
45
  return "\n".join(results)
46
 
@@ -49,7 +55,7 @@ iface = gr.Interface(
49
  inputs=[
50
  gr.Textbox(lines=20, label="Paste Resumes (separate multiple resumes by two newlines)"),
51
  gr.Textbox(lines=10, label="Job Description"),
52
- gr.Radio(choices=["GPT-4o", "Gemma", "Bloom", "jabir", "llama", "All"], label="Choose Model")
53
  ],
54
  outputs="text",
55
  title="Multiple Resume Evaluator"
 
1
  import gradio as gr
2
  import fitz # PyMuPDF
3
+ from models import evaluate_with_gpt, evaluate_with_gemma, evaluate_with_bloom, evaluate_with_jabir, evaluate_with_llama ,evaluate_with_qwen
4
 
5
  def extract_text_from_pdf(pdf_file):
6
  document = fitz.open(pdf_file)
 
17
  bloom_result = evaluate_with_bloom(resume_text, job_description)
18
  jabir_result = evaluate_with_jabir(resume_text, job_description)
19
  llama_result = evaluate_with_llama(resume_text, job_description)
20
+ qwen_result=evaluate_with_qwen(resume_text, job_description)
21
+
22
+
23
+ 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{llama_result}\n\nqwen_result:\n{qwen_result}"
24
  import gradio as gr
25
+ from models import evaluate_with_gpt, evaluate_with_gemma, evaluate_with_bloom, evaluate_with_jabir, evaluate_with_llama,evaluate_with_qwen
26
 
27
  def evaluate_multiple_resumes(resume_texts, job_description, model):
28
  results = []
 
37
  result = evaluate_with_jabir(resume_text, job_description)
38
  elif model == "llama":
39
  result = evaluate_with_llama(resume_text, job_description)
40
+ elif model=="qwen":
41
+ evaluate_with_qwen(resume_text, job_description)
42
  else:
43
  gpt_result = evaluate_with_gpt(resume_text, job_description)
44
  gemma_result = evaluate_with_gemma(resume_text, job_description)
45
  bloom_result = evaluate_with_bloom(resume_text, job_description)
46
  jabir_result = evaluate_with_jabir(resume_text, job_description)
47
  llama_result = evaluate_with_llama(resume_text, job_description)
48
+ qwen_result=evaluate_with_qwen(resume_text, job_description)
49
+ result = 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{llama_result}\n\nqwen_result:\n{qwen_result}"
50
  results.append(f"Result for Resume:\n{result}\n\n")
51
  return "\n".join(results)
52
 
 
55
  inputs=[
56
  gr.Textbox(lines=20, label="Paste Resumes (separate multiple resumes by two newlines)"),
57
  gr.Textbox(lines=10, label="Job Description"),
58
+ gr.Radio(choices=["GPT-4o", "Gemma", "Bloom", "jabir", "llama", "qwen","All"], label="Choose Model")
59
  ],
60
  outputs="text",
61
  title="Multiple Resume Evaluator"