Spaces:
Running
Running
profile_instru
Browse files
app.py
CHANGED
@@ -119,9 +119,9 @@ with gr.Blocks(css="""#chat_container {height: 820px; width: 1000px; margin-left
|
|
119 |
)
|
120 |
with gr.Row():
|
121 |
with gr.Column(scale=2, min_width=300):
|
122 |
-
name_input = gr.Textbox(label="Input
|
123 |
set_button = gr.Button("Set Profile")
|
124 |
-
profile_text = gr.Textbox(label="Generated
|
125 |
edit_button = gr.Button("Edit Profile", scale=1)
|
126 |
set_button.click(set_profile, inputs=name_input, outputs=[profile_text])
|
127 |
edit_button.click(edit_profile, inputs=[profile_text, name_input], outputs=[profile_text])
|
@@ -191,7 +191,7 @@ with gr.Blocks(css="""#chat_container {height: 820px; width: 1000px; margin-left
|
|
191 |
|
192 |
|
193 |
with gr.Row():
|
194 |
-
comment_input = gr.Textbox(label="With Arxiv Copilot, how
|
195 |
comment_button = gr.Button(value="Comment", scale=1)
|
196 |
|
197 |
|
|
|
119 |
)
|
120 |
with gr.Row():
|
121 |
with gr.Column(scale=2, min_width=300):
|
122 |
+
name_input = gr.Textbox(label="Input your name:")
|
123 |
set_button = gr.Button("Set Profile")
|
124 |
+
profile_text = gr.Textbox(label="Generated profile (can be edited):", interactive=True, scale=7, lines=5, max_lines=5)
|
125 |
edit_button = gr.Button("Edit Profile", scale=1)
|
126 |
set_button.click(set_profile, inputs=name_input, outputs=[profile_text])
|
127 |
edit_button.click(edit_profile, inputs=[profile_text, name_input], outputs=[profile_text])
|
|
|
191 |
|
192 |
|
193 |
with gr.Row():
|
194 |
+
comment_input = gr.Textbox(label="With Arxiv Copilot, how many minutes do you save to obtain the same amount of information?", scale=9, lines=3)
|
195 |
comment_button = gr.Button(value="Comment", scale=1)
|
196 |
|
197 |
|
utils.py
CHANGED
@@ -182,20 +182,20 @@ def summarize_research_field(profile, keywords, dataset,data_embedding):
|
|
182 |
input = {}
|
183 |
if profile is None:
|
184 |
prompt_qa = (
|
185 |
-
"Given
|
186 |
-
"Here are the keywords: {keywords}"
|
187 |
"Here are the retrieved paper abstracts: {papers}"
|
188 |
)
|
189 |
query_format = (
|
190 |
"Given the keywords, retrieve some recent paper titles and abstracts can represent research trends in this field."
|
191 |
"Here are the keywords: {keywords}"
|
192 |
)
|
193 |
-
input['keywords'] = keywords
|
194 |
query_input['keywords'] = keywords
|
195 |
else:
|
196 |
prompt_qa = (
|
197 |
-
"Given
|
198 |
-
"Here is my profile: {profile}"
|
199 |
# "Here are the keywords: {keywords}"
|
200 |
"Here are the retrieved paper abstracts: {papers}"
|
201 |
)
|
@@ -204,7 +204,6 @@ def summarize_research_field(profile, keywords, dataset,data_embedding):
|
|
204 |
"Here is my profile: {profile}"
|
205 |
# "Here are the keywords: {keywords}"
|
206 |
)
|
207 |
-
input['profile'] = profile
|
208 |
query_input['profile'] = profile
|
209 |
# import pdb
|
210 |
# pdb.set_trace()
|
|
|
182 |
input = {}
|
183 |
if profile is None:
|
184 |
prompt_qa = (
|
185 |
+
"Given some recent paper titles and abstracts. Could you summarize no more than 10 top keywords of high level research backgounds and trends."
|
186 |
+
# "Here are the keywords: {keywords}"
|
187 |
"Here are the retrieved paper abstracts: {papers}"
|
188 |
)
|
189 |
query_format = (
|
190 |
"Given the keywords, retrieve some recent paper titles and abstracts can represent research trends in this field."
|
191 |
"Here are the keywords: {keywords}"
|
192 |
)
|
193 |
+
# input['keywords'] = keywords
|
194 |
query_input['keywords'] = keywords
|
195 |
else:
|
196 |
prompt_qa = (
|
197 |
+
"Given some recent paper titles and abstracts. Could you summarize no more than 10 top keywords of high level research backgounds and trends."
|
198 |
+
# "Here is my profile: {profile}"
|
199 |
# "Here are the keywords: {keywords}"
|
200 |
"Here are the retrieved paper abstracts: {papers}"
|
201 |
)
|
|
|
204 |
"Here is my profile: {profile}"
|
205 |
# "Here are the keywords: {keywords}"
|
206 |
)
|
|
|
207 |
query_input['profile'] = profile
|
208 |
# import pdb
|
209 |
# pdb.set_trace()
|