Spaces:
Runtime error
Runtime error
Commit
·
760970b
1
Parent(s):
67aa790
fix
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +1 -4
- requirements.txt +1 -0
- style.css +0 -4
- supervisord.conf +0 -22
__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
|
@@ -7,7 +7,6 @@ from datetime import datetime, timedelta
|
|
| 7 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 8 |
from agents import DeepResearchAgent, get_llms
|
| 9 |
import threading
|
| 10 |
-
from queue import Queue
|
| 11 |
import logging
|
| 12 |
|
| 13 |
lock = threading.Lock()
|
|
@@ -321,8 +320,6 @@ scheduler = BackgroundScheduler()
|
|
| 321 |
scheduler.add_job(reset_counter, 'cron', hour=0, minute=0)
|
| 322 |
scheduler.start()
|
| 323 |
|
| 324 |
-
request_queue = Queue()
|
| 325 |
-
|
| 326 |
@app.get("/", response_class=HTMLResponse)
|
| 327 |
def form_get():
|
| 328 |
return Template(html_template).render(idea= "This is a example of the idea geneartion", error=None, reply_count=reply_count)
|
|
@@ -334,7 +331,7 @@ def form_post(topic: str = Form(...)):
|
|
| 334 |
start_time = time.time()
|
| 335 |
|
| 336 |
if is_processing:
|
| 337 |
-
error = "The server is processing another request. Please try again later."
|
| 338 |
return Template(html_template).render(idea="", error=error, reply_count=reply_count)
|
| 339 |
|
| 340 |
with lock:
|
|
|
|
| 7 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 8 |
from agents import DeepResearchAgent, get_llms
|
| 9 |
import threading
|
|
|
|
| 10 |
import logging
|
| 11 |
|
| 12 |
lock = threading.Lock()
|
|
|
|
| 320 |
scheduler.add_job(reset_counter, 'cron', hour=0, minute=0)
|
| 321 |
scheduler.start()
|
| 322 |
|
|
|
|
|
|
|
| 323 |
@app.get("/", response_class=HTMLResponse)
|
| 324 |
def form_get():
|
| 325 |
return Template(html_template).render(idea= "This is a example of the idea geneartion", error=None, reply_count=reply_count)
|
|
|
|
| 331 |
start_time = time.time()
|
| 332 |
|
| 333 |
if is_processing:
|
| 334 |
+
error = "The server is processing another request. Please try again later(We only process one instruction at a time, please forgive me.)."
|
| 335 |
return Template(html_template).render(idea="", error=error, reply_count=reply_count)
|
| 336 |
|
| 337 |
with lock:
|
requirements.txt
CHANGED
|
@@ -18,6 +18,7 @@ tqdm
|
|
| 18 |
fastapi
|
| 19 |
uvicorn[standard]
|
| 20 |
jinja2
|
|
|
|
| 21 |
markdown
|
| 22 |
apscheduler
|
| 23 |
Pillow
|
|
|
|
| 18 |
fastapi
|
| 19 |
uvicorn[standard]
|
| 20 |
jinja2
|
| 21 |
+
websockets
|
| 22 |
markdown
|
| 23 |
apscheduler
|
| 24 |
Pillow
|
style.css
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
/* styles.css */
|
| 2 |
-
.same-height {
|
| 3 |
-
height: 100%;
|
| 4 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
supervisord.conf
DELETED
|
@@ -1,22 +0,0 @@
|
|
| 1 |
-
[supervisord]
|
| 2 |
-
nodaemon=true
|
| 3 |
-
pidfile=/dev/null
|
| 4 |
-
logfile=/dev/null
|
| 5 |
-
logfile_maxbytes=0
|
| 6 |
-
logfile_backups=0
|
| 7 |
-
loglevel=info
|
| 8 |
-
|
| 9 |
-
[program:gradle_service]
|
| 10 |
-
command=/app/grobid/gradlew run
|
| 11 |
-
environment=JAVA_HOME="/opt/jdk-11.0.2",PATH="/opt/jdk-11.0.2/bin:/home/user/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| 12 |
-
directory=/app
|
| 13 |
-
autostart=true
|
| 14 |
-
autorestart=true
|
| 15 |
-
startsecs=10
|
| 16 |
-
stdout_logfile=/dev/stdout
|
| 17 |
-
stderr_logfile=/dev/stder
|
| 18 |
-
|
| 19 |
-
[program:uvicorn_service]
|
| 20 |
-
command=uvicorn app:app --host "0.0.0.0" --port 7860
|
| 21 |
-
directory=/app
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|