Update Some minor string error
Browse files
app.py
CHANGED
|
@@ -59,7 +59,9 @@ def process_resume_and_respond(pdf_file, message, history, system_message, max_t
|
|
| 59 |
# Combine the resume text with the user message
|
| 60 |
combined_message = f"Resume:\n{resume_text}\n\nUser message:\n{message}"
|
| 61 |
# Respond using the combined message
|
| 62 |
-
|
|
|
|
|
|
|
| 63 |
|
| 64 |
|
| 65 |
# Store the uploaded PDF content globally
|
|
@@ -76,7 +78,9 @@ def respond_with_resume(message, history, system_message, max_tokens, temperatur
|
|
| 76 |
# Combine the uploaded resume text with the user message
|
| 77 |
combined_message = f"Resume:\n{uploaded_resume_text}\n\nUser message:\n{message}"
|
| 78 |
# Respond using the combined message
|
| 79 |
-
|
|
|
|
|
|
|
| 80 |
|
| 81 |
|
| 82 |
"""
|
|
@@ -93,7 +97,7 @@ chat_interface = gr.ChatInterface(
|
|
| 93 |
additional_inputs=[
|
| 94 |
gr.Textbox(value="You are a Job Advisor Chatbot.", label="System message"),
|
| 95 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
| 96 |
-
gr.Slider(minimum=0.1, maximum
|
| 97 |
gr.Slider(
|
| 98 |
minimum=0.1,
|
| 99 |
maximum=1.0,
|
|
|
|
| 59 |
# Combine the resume text with the user message
|
| 60 |
combined_message = f"Resume:\n{resume_text}\n\nUser message:\n{message}"
|
| 61 |
# Respond using the combined message
|
| 62 |
+
response_gen = respond(combined_message, history, system_message, max_tokens, temperature, top_p)
|
| 63 |
+
response = "".join([token for token in response_gen])
|
| 64 |
+
return response
|
| 65 |
|
| 66 |
|
| 67 |
# Store the uploaded PDF content globally
|
|
|
|
| 78 |
# Combine the uploaded resume text with the user message
|
| 79 |
combined_message = f"Resume:\n{uploaded_resume_text}\n\nUser message:\n{message}"
|
| 80 |
# Respond using the combined message
|
| 81 |
+
response_gen = respond(combined_message, history, system_message, max_tokens, temperature, top_p)
|
| 82 |
+
response = "".join([token for token in response_gen])
|
| 83 |
+
return response
|
| 84 |
|
| 85 |
|
| 86 |
"""
|
|
|
|
| 97 |
additional_inputs=[
|
| 98 |
gr.Textbox(value="You are a Job Advisor Chatbot.", label="System message"),
|
| 99 |
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
| 100 |
+
gr.Slider(minimum=0.1, maximum 4.0, value=0.7, step=0.1, label="Temperature"),
|
| 101 |
gr.Slider(
|
| 102 |
minimum=0.1,
|
| 103 |
maximum=1.0,
|