Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,11 +52,11 @@ if uploaded_file:
|
|
52 |
st.text_area("Preview:", extracted_text, height=150)
|
53 |
|
54 |
def get_final_output(full_text):
|
55 |
-
#
|
56 |
-
if "### Output:" in full_text:
|
57 |
-
return full_text.split("### Output:")[-1].strip()
|
58 |
-
|
59 |
-
|
60 |
# Define LLM Prompt Templates
|
61 |
email_template = PromptTemplate.from_template("""
|
62 |
You are an AI assistant skilled in crafting personalized and engaging cold emails for research positions.
|
|
|
52 |
st.text_area("Preview:", extracted_text, height=150)
|
53 |
|
54 |
def get_final_output(full_text):
|
55 |
+
# Find the last occurrence of "### Output:" and return everything after it
|
56 |
+
if "### Output:" in full_text:
|
57 |
+
return full_text.split("### Output:", 1)[-1].strip()
|
58 |
+
return full_text.strip()
|
59 |
+
|
60 |
# Define LLM Prompt Templates
|
61 |
email_template = PromptTemplate.from_template("""
|
62 |
You are an AI assistant skilled in crafting personalized and engaging cold emails for research positions.
|