jianghuyihei commited on
Commit
d3ff32f
1 Parent(s): 3822b4d
__pycache__/app.cpython-310.pyc CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
 
app.py CHANGED
@@ -47,7 +47,7 @@ html_template = """
47
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
48
  }
49
  h1 {
50
- font-size: 2rem;
51
  margin-bottom: 1.5rem;
52
  color: #333;
53
  text-align: center;
@@ -134,25 +134,28 @@ html_template = """
134
  .result .box {
135
  flex: 1;
136
  margin: 0.5rem;
137
- padding: 1rem;
138
- background-color: #e9ecef;
139
- border-radius: 10px;
140
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
141
  word-wrap: break-word;
142
- height: 400px;
143
  overflow-y: auto;
144
- font-size: 1rem;
145
  font-family: "Times New Roman", Times, serif;
146
- line-height: 1.5;
 
 
 
147
  }
148
  .error .box {
149
- width: 100%;
150
  padding: 1rem;
151
  background-color: #f8d7da;
152
  color: #721c24;
153
  border-radius: 10px;
154
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
155
  word-wrap: break-word;
 
156
  }
157
  h2 {
158
  font-size: 1.3rem;
@@ -164,13 +167,14 @@ html_template = """
164
  to { opacity: 1; }
165
  }
166
  .progress-bar-container {
167
- width: 100%;
168
  background-color: #e9ecef;
169
  border-radius: 10px;
170
  overflow: hidden;
171
- margin-top: 1.5rem;
172
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
173
  }
 
174
  .progress-bar {
175
  height: 20px;
176
  background-color: #727372;
@@ -182,39 +186,57 @@ html_template = """
182
  justify-content: space-between;
183
  align-items: center;
184
  margin-bottom: 1.5rem;
 
 
185
  }
186
  .example-label {
187
  flex: 0.7;
188
- font-size: 1 rem;
189
- color: #333;
190
  text-align: center;
191
  margin-right: 0rem;
192
  padding: 0.5rem 0.2rem;
193
  background-color: #f0f8ff;
 
194
  border-radius: 10px;
195
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
196
- font-family: 'Times new roman', cursive, sans-serif;
197
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
198
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
 
 
 
 
 
 
 
 
 
199
  }
200
  .example-topics {
201
  flex: 6;
202
  display: flex;
 
203
  justify-content: space-around;
204
  }
205
  .example-topics button {
206
  padding: 0.5rem 1rem;
207
- font-size: 1rem;
208
- background-color: #ffa07a; /* 浅橙色 */
209
- color: #fff;
210
  border: none;
211
  border-radius: 5px;
212
  cursor: pointer;
213
  margin: 0.3rem;
214
  transition: background-color 0.3s ease;
 
 
 
 
 
215
  }
216
  .example-topics button:hover {
217
- background-color: #ff4500; /* 深橙色 */
218
  }
219
  </style>
220
  <script>
@@ -270,7 +292,18 @@ html_template = """
270
  </head>
271
  <body>
272
  <div class="container">
273
- <h1>CoI Agent online demo 😊</h1>
 
 
 
 
 
 
 
 
 
 
 
274
  <div class="time-counter-container">
275
  <div id="time-taken" class="time-box">Time Taken: {{ time_taken }} seconds</div>
276
  <div class="counter-box">Today's Replies: {{ reply_count }}/100 </div>
@@ -280,21 +313,19 @@ html_template = """
280
  </div>
281
  <div class="result">
282
  <div class="box">
283
- <h2>Idea</h2>
284
  <div>{{ idea | safe }}</div>
285
  </div>
286
  </div>
287
  <form action="/" method="post" onsubmit="showLoading()">
288
  <div class="form-group">
289
- <label for="topic">Topic:</label>
290
- <input type="text" id="topic" name="topic">
291
  <input type="hidden" id="user_id" name="user_id">
292
  <input type="hidden" id="state" name="state">
293
  <button type="submit" id="submit-btn">{{ button_text }}</button>
294
  </div>
295
  </form>
296
  <div class="example-container">
297
- <div class="example-label">Example Input:</div>
298
  <div class="example-topics">
299
  <button onclick="fillTopic('Realistic Image Synthesis in Medical Imaging')">Realistic Image Synthesis in Medical Imaging</button>
300
  <button onclick="fillTopic('Using diffusion to generate road layout')">Using diffusion to generate road layout</button>
@@ -328,7 +359,6 @@ scheduler = BackgroundScheduler()
328
  scheduler.add_job(reset_counter, 'cron', hour=0, minute=0)
329
  scheduler.start()
330
 
331
- queue = Queue()
332
  def fix_markdown(text):
333
  lines = text.split('\n')
334
  # Initialize the result list
@@ -360,6 +390,8 @@ script_template = """
360
  window.onload = setstate;
361
  """
362
 
 
 
363
  @app.get("/", response_class=HTMLResponse)
364
  def form_get():
365
 
 
47
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
48
  }
49
  h1 {
50
+ font-size: 1.5rem;
51
  margin-bottom: 1.5rem;
52
  color: #333;
53
  text-align: center;
 
134
  .result .box {
135
  flex: 1;
136
  margin: 0.5rem;
137
+ padding: 0.5rem;
138
+ background-color:#fafafa;
139
+ color:#4a4a4a;
 
140
  word-wrap: break-word;
141
+ height: 500px;
142
  overflow-y: auto;
143
+ font-size: 0.9rem;
144
  font-family: "Times New Roman", Times, serif;
145
+ line-height: 1.8;
146
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
147
+ border-radius: 10px;
148
+ border: 1px solid #ddd;
149
  }
150
  .error .box {
151
+ width: 95%;
152
  padding: 1rem;
153
  background-color: #f8d7da;
154
  color: #721c24;
155
  border-radius: 10px;
156
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
157
  word-wrap: break-word;
158
+ margin-left: 1rem;
159
  }
160
  h2 {
161
  font-size: 1.3rem;
 
167
  to { opacity: 1; }
168
  }
169
  .progress-bar-container {
170
+ width: 99%;
171
  background-color: #e9ecef;
172
  border-radius: 10px;
173
  overflow: hidden;
174
+ margin: 0.5rem auto; /* 水平居中 */
175
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
176
  }
177
+
178
  .progress-bar {
179
  height: 20px;
180
  background-color: #727372;
 
186
  justify-content: space-between;
187
  align-items: center;
188
  margin-bottom: 1.5rem;
189
+ height: 50px;
190
+ margin-left: 1rem;
191
  }
192
  .example-label {
193
  flex: 0.7;
194
+ font-size: 1rem; /* 修正了 font-size 的语法 */
195
+ color: purple; /* 将字体颜色改为紫色 */
196
  text-align: center;
197
  margin-right: 0rem;
198
  padding: 0.5rem 0.2rem;
199
  background-color: #f0f8ff;
200
+ border: 1px solid white; /* 添加白色边框 */
201
  border-radius: 10px;
202
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
203
+ font-family: 'Times New Roman', cursive, sans-serif;
204
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
205
+ position: relative; /* 为了放置表格状符号 */
206
+ display: flex;
207
+ align-items: center;
208
+ }
209
+
210
+ .example-label::before {
211
+ content: "📋"; /* 表格状符号 */
212
+ margin-right: 0.5rem; /* 符号和文本之间的间距 */
213
+ font-size: 1.2rem;
214
+ color: purple; /* 符号颜色也改成紫色 */
215
  }
216
  .example-topics {
217
  flex: 6;
218
  display: flex;
219
+ min-width: 80%;
220
  justify-content: space-around;
221
  }
222
  .example-topics button {
223
  padding: 0.5rem 1rem;
224
+ font-size: 0.9rem;
225
+ background-color: #f0f8ff; /* 橙色 */
226
+ color: #000000;
227
  border: none;
228
  border-radius: 5px;
229
  cursor: pointer;
230
  margin: 0.3rem;
231
  transition: background-color 0.3s ease;
232
+ height: 50px;
233
+ min-width: 320px;
234
+ border: 1px solid white; /* 添加白色边框 */
235
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
236
+ font-family: 'Times New Roman', cursive, sans-serif;
237
  }
238
  .example-topics button:hover {
239
+ background-color: #e0e0e0;
240
  }
241
  </style>
242
  <script>
 
292
  </head>
293
  <body>
294
  <div class="container">
295
+ <div style="display: flex; justify-content: center; align-items: center; text-align: center; margin-bottom: 1.5rem;">
296
+ <div>
297
+ <h1 >CoI Agent: Revolutionizing Research in Novel Idea Development with LLM Agents</h1>
298
+ <h3 style="margin: 0;">If this demo please you, please give us a star ⭐ on Github or 💖 on this space.</h3>
299
+ <h5 style="margin: 0;">
300
+ We only provide a simplified version here, and the number of replies is limited every day. <br>
301
+ At the same time, due to the instability of PDF downloads, the waiting time may be longer, thank you for your understand. <br>
302
+ If you want to experience the full version, please go to our github repository
303
+ <a href="https://github.com/DAMO-NLP-SG/CoI-Agent" color="blue""> https://github.com/DAMO-NLP-SG/CoI-Agent </a>
304
+ </h5>
305
+ </div>
306
+ </div>
307
  <div class="time-counter-container">
308
  <div id="time-taken" class="time-box">Time Taken: {{ time_taken }} seconds</div>
309
  <div class="counter-box">Today's Replies: {{ reply_count }}/100 </div>
 
313
  </div>
314
  <div class="result">
315
  <div class="box">
 
316
  <div>{{ idea | safe }}</div>
317
  </div>
318
  </div>
319
  <form action="/" method="post" onsubmit="showLoading()">
320
  <div class="form-group">
321
+ <input type="text" id="topic" name="topic" placeholder="Enter your topic">
 
322
  <input type="hidden" id="user_id" name="user_id">
323
  <input type="hidden" id="state" name="state">
324
  <button type="submit" id="submit-btn">{{ button_text }}</button>
325
  </div>
326
  </form>
327
  <div class="example-container">
328
+ <div class="example-label">Example:</div>
329
  <div class="example-topics">
330
  <button onclick="fillTopic('Realistic Image Synthesis in Medical Imaging')">Realistic Image Synthesis in Medical Imaging</button>
331
  <button onclick="fillTopic('Using diffusion to generate road layout')">Using diffusion to generate road layout</button>
 
359
  scheduler.add_job(reset_counter, 'cron', hour=0, minute=0)
360
  scheduler.start()
361
 
 
362
  def fix_markdown(text):
363
  lines = text.split('\n')
364
  # Initialize the result list
 
390
  window.onload = setstate;
391
  """
392
 
393
+ queue = Queue()
394
+
395
  @app.get("/", response_class=HTMLResponse)
396
  def form_get():
397
 
prompts/__pycache__/deep_research_agent_promts.cpython-310.pyc CHANGED
Binary files a/prompts/__pycache__/deep_research_agent_promts.cpython-310.pyc and b/prompts/__pycache__/deep_research_agent_promts.cpython-310.pyc differ