LeoWalker commited on
Commit
19749ed
1 Parent(s): f29b60d

merged changes

Browse files
Files changed (1) hide show
  1. app.py +0 -15
app.py CHANGED
@@ -87,17 +87,10 @@ st.title("Resume Parser")
87
 
88
  # Set up the LLM dictionary
89
  llm_dict = {
90
- <<<<<<< HEAD
91
  # "gpt-4-1106-preview": ChatOpenAI(temperature=0, model="gpt-4-1106-preview"),
92
  # "gpt-4": ChatOpenAI(temperature=0, model="gpt-4"),
93
  "gpt-3.5-turbo-1106": ChatOpenAI(temperature=0, model="gpt-3.5-turbo-1106"),
94
  # "claude-2": ChatAnthropic(model="claude-2", max_tokens=20_000),
95
- =======
96
- "gpt-4-1106-preview": ChatOpenAI(temperature=0, model="gpt-4-1106-preview"),
97
- "gpt-4": ChatOpenAI(temperature=0, model="gpt-4"),
98
- "gpt-3.5-turbo-1106": ChatOpenAI(temperature=0, model="gpt-3.5-turbo-1106"),
99
- "claude-2": ChatAnthropic(model="claude-2", max_tokens=20_000),
100
- >>>>>>> 726975d5ca7f0a98a5047fbda8870a0f03f55283
101
  "claude-instant-1": ChatAnthropic(model="claude-instant-1", max_tokens=20_000)
102
  }
103
 
@@ -111,18 +104,14 @@ uploaded_file = st.file_uploader("Upload a PDF file", type="pdf")
111
  if uploaded_file is not None:
112
  # Add a button to trigger the conversion
113
  if st.button("Convert PDF to Text"):
114
- <<<<<<< HEAD
115
  start_time = time.time() # Start the timer
116
 
117
- =======
118
- >>>>>>> 726975d5ca7f0a98a5047fbda8870a0f03f55283
119
  # Convert the uploaded file to a string
120
  text = pdf_to_string(uploaded_file)
121
 
122
  # Extract resume fields using the selected model
123
  extracted_fields = extract_resume_fields(text, selected_model)
124
 
125
- <<<<<<< HEAD
126
  end_time = time.time() # Stop the timer
127
  elapsed_time = end_time - start_time # Calculate the elapsed time
128
 
@@ -139,7 +128,3 @@ if uploaded_file is not None:
139
  for key, value in extracted_fields.items():
140
  st.write(f"{key}: {value}")
141
 
142
- =======
143
- # Display the extracted fields on the Streamlit app
144
- st.json(extracted_fields)
145
- >>>>>>> 726975d5ca7f0a98a5047fbda8870a0f03f55283
 
87
 
88
  # Set up the LLM dictionary
89
  llm_dict = {
 
90
  # "gpt-4-1106-preview": ChatOpenAI(temperature=0, model="gpt-4-1106-preview"),
91
  # "gpt-4": ChatOpenAI(temperature=0, model="gpt-4"),
92
  "gpt-3.5-turbo-1106": ChatOpenAI(temperature=0, model="gpt-3.5-turbo-1106"),
93
  # "claude-2": ChatAnthropic(model="claude-2", max_tokens=20_000),
 
 
 
 
 
 
94
  "claude-instant-1": ChatAnthropic(model="claude-instant-1", max_tokens=20_000)
95
  }
96
 
 
104
  if uploaded_file is not None:
105
  # Add a button to trigger the conversion
106
  if st.button("Convert PDF to Text"):
 
107
  start_time = time.time() # Start the timer
108
 
 
 
109
  # Convert the uploaded file to a string
110
  text = pdf_to_string(uploaded_file)
111
 
112
  # Extract resume fields using the selected model
113
  extracted_fields = extract_resume_fields(text, selected_model)
114
 
 
115
  end_time = time.time() # Stop the timer
116
  elapsed_time = end_time - start_time # Calculate the elapsed time
117
 
 
128
  for key, value in extracted_fields.items():
129
  st.write(f"{key}: {value}")
130