Spaces:
Sleeping
Sleeping
vincentmin
commited on
Commit
·
a5664be
1
Parent(s):
d32e198
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ FORMAT = '%Y%m%d%H%M%S'
|
|
15 |
embeddings = HuggingFaceEmbeddings()
|
16 |
|
17 |
document_prompt = PromptTemplate(
|
18 |
-
template="Title: {
|
19 |
-
input_variables=["page_content", "
|
20 |
)
|
21 |
prompt = PromptTemplate(
|
22 |
template="""Write an engaging newsletter on the most recent exciting developments in the following field:"{context}". Base the newsletter on the articles below. Extract the most exciting points and combine them into an excillerating newsletter. Use emojis to catch attention and use the Markdown format.\n\n#ARTICLES\n"{text}"\n\nNEWSLETTER:\n# AI curated newsletter\n""",
|
@@ -107,7 +107,7 @@ with gr.Blocks() as demo:
|
|
107 |
category = gr.Textbox(value="hep-th", label="Which category to search through. See https://arxiv.org/category_taxonomy for possible values.")
|
108 |
|
109 |
with gr.Box():
|
110 |
-
input_text = gr.Textbox(placeholder="Describe your field of research in a few words", container=False)
|
111 |
gr.Examples(
|
112 |
[["Supersymmetric Conformal Field Theory"], ["Black hole information paradox"]],
|
113 |
input_text,
|
|
|
15 |
embeddings = HuggingFaceEmbeddings()
|
16 |
|
17 |
document_prompt = PromptTemplate(
|
18 |
+
template="Title: {title}\nContent: {page_content}",
|
19 |
+
input_variables=["page_content", "title"],
|
20 |
)
|
21 |
prompt = PromptTemplate(
|
22 |
template="""Write an engaging newsletter on the most recent exciting developments in the following field:"{context}". Base the newsletter on the articles below. Extract the most exciting points and combine them into an excillerating newsletter. Use emojis to catch attention and use the Markdown format.\n\n#ARTICLES\n"{text}"\n\nNEWSLETTER:\n# AI curated newsletter\n""",
|
|
|
107 |
category = gr.Textbox(value="hep-th", label="Which category to search through. See https://arxiv.org/category_taxonomy for possible values.")
|
108 |
|
109 |
with gr.Box():
|
110 |
+
input_text = gr.Textbox(placeholder="Describe your field of research in a few words", container=False, show_label=False)
|
111 |
gr.Examples(
|
112 |
[["Supersymmetric Conformal Field Theory"], ["Black hole information paradox"]],
|
113 |
input_text,
|