Spaces:
Running
on
L4
Running
on
L4
bump fasthtml and uvicorn
Browse files- __pycache__/main.cpython-310.pyc +0 -0
- frontend/__pycache__/app.cpython-310.pyc +0 -0
- frontend/app.py +1 -1
- main.py +4 -9
- static/sim_maps/-8752960445958399872_0_10.png +0 -0
- static/sim_maps/-8752960445958399872_0_11.png +0 -0
- static/sim_maps/-8752960445958399872_0_12.png +0 -0
- static/sim_maps/-8752960445958399872_0_13.png +0 -0
- static/sim_maps/-8752960445958399872_0_15.png +0 -0
- static/sim_maps/-8752960445958399872_0_16.png +0 -0
- static/sim_maps/-8752960445958399872_0_17.png +0 -0
- static/sim_maps/-8752960445958399872_0_18.png +0 -0
- static/sim_maps/-8752960445958399872_0_3.png +0 -0
- static/sim_maps/-8752960445958399872_0_4.png +0 -0
- static/sim_maps/-8752960445958399872_0_5.png +0 -0
- static/sim_maps/-8752960445958399872_0_6.png +0 -0
- static/sim_maps/-8752960445958399872_0_8.png +0 -0
- static/sim_maps/-8752960445958399872_0_9.png +0 -0
- static/sim_maps/-8752960445958399872_1_10.png +0 -0
- static/sim_maps/-8752960445958399872_1_11.png +0 -0
- static/sim_maps/-8752960445958399872_1_12.png +0 -0
- static/sim_maps/-8752960445958399872_1_13.png +0 -0
- static/sim_maps/-8752960445958399872_1_15.png +0 -0
- static/sim_maps/-8752960445958399872_1_16.png +0 -0
- static/sim_maps/-8752960445958399872_1_17.png +0 -0
- static/sim_maps/-8752960445958399872_1_18.png +0 -0
- static/sim_maps/-8752960445958399872_1_3.png +0 -0
- static/sim_maps/-8752960445958399872_1_4.png +0 -0
- static/sim_maps/-8752960445958399872_1_5.png +0 -0
- static/sim_maps/-8752960445958399872_1_6.png +0 -0
- static/sim_maps/-8752960445958399872_1_8.png +0 -0
- static/sim_maps/-8752960445958399872_1_9.png +0 -0
- static/sim_maps/-8752960445958399872_2_10.png +0 -0
- static/sim_maps/-8752960445958399872_2_11.png +0 -0
- static/sim_maps/-8752960445958399872_2_12.png +0 -0
- static/sim_maps/-8752960445958399872_2_13.png +0 -0
- static/sim_maps/-8752960445958399872_2_15.png +0 -0
- static/sim_maps/-8752960445958399872_2_16.png +0 -0
- static/sim_maps/-8752960445958399872_2_17.png +0 -0
- static/sim_maps/-8752960445958399872_2_18.png +0 -0
- static/sim_maps/-8752960445958399872_2_3.png +0 -0
- static/sim_maps/-8752960445958399872_2_4.png +0 -0
- static/sim_maps/-8752960445958399872_2_5.png +0 -0
- static/sim_maps/-8752960445958399872_2_6.png +0 -0
- static/sim_maps/-8752960445958399872_2_8.png +0 -0
- static/sim_maps/-8752960445958399872_2_9.png +0 -0
__pycache__/main.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/main.cpython-310.pyc and b/__pycache__/main.cpython-310.pyc differ
|
|
|
frontend/__pycache__/app.cpython-310.pyc
CHANGED
|
Binary files a/frontend/__pycache__/app.cpython-310.pyc and b/frontend/__pycache__/app.cpython-310.pyc differ
|
|
|
frontend/app.py
CHANGED
|
@@ -755,7 +755,7 @@ def ChatResult(query_id: str, query: str, doc_ids: Optional[list] = None):
|
|
| 755 |
)
|
| 756 |
|
| 757 |
return Div(
|
| 758 |
-
Div("AI-response (Gemini-2.
|
| 759 |
Div(
|
| 760 |
Div(
|
| 761 |
messages,
|
|
|
|
| 755 |
)
|
| 756 |
|
| 757 |
return Div(
|
| 758 |
+
Div("AI-response (Gemini-2.0)", cls="text-xl font-semibold p-5"),
|
| 759 |
Div(
|
| 760 |
Div(
|
| 761 |
messages,
|
main.py
CHANGED
|
@@ -24,6 +24,7 @@ from fasthtml.common import (
|
|
| 24 |
Script,
|
| 25 |
StreamingResponse,
|
| 26 |
fast_app,
|
|
|
|
| 27 |
)
|
| 28 |
from PIL import Image
|
| 29 |
from shad4fast import ShadHead
|
|
@@ -42,7 +43,6 @@ from frontend.app import (
|
|
| 42 |
SimMapButtonReady,
|
| 43 |
)
|
| 44 |
from frontend.layout import Layout
|
| 45 |
-
import uvicorn
|
| 46 |
|
| 47 |
highlight_js_theme_link = Link(id="highlight-theme", rel="stylesheet", href="")
|
| 48 |
highlight_js_theme = Script(src="/static/js/highlightjs-theme.js")
|
|
@@ -68,11 +68,7 @@ awesomplete_link = Link(
|
|
| 68 |
awesomplete_js = Script(
|
| 69 |
src="https://cdnjs.cloudflare.com/ajax/libs/awesomplete/1.1.7/awesomplete.min.js"
|
| 70 |
)
|
| 71 |
-
sselink = Script(
|
| 72 |
-
src="https://cdn.jsdelivr.net/npm/[email protected]",
|
| 73 |
-
integrity="sha384-A986SAtodyH8eg8x8irJnYUk7i9inVQqYigD6qZ9evobksGNIXfeFvDwLSHcp31N",
|
| 74 |
-
crossorigin="anonymous",
|
| 75 |
-
)
|
| 76 |
|
| 77 |
# Get log level from environment variable, default to INFO
|
| 78 |
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper()
|
|
@@ -116,7 +112,7 @@ This means that newlines will be replaced with <br> tags, bold text will be encl
|
|
| 116 |
Do NOT include backticks (`) in your response. Only simple HTML tags and text.
|
| 117 |
"""
|
| 118 |
gemini_model = genai.GenerativeModel(
|
| 119 |
-
"gemini-2.
|
| 120 |
)
|
| 121 |
STATIC_DIR = Path("static")
|
| 122 |
IMG_DIR = STATIC_DIR / "full_images"
|
|
@@ -421,5 +417,4 @@ def get():
|
|
| 421 |
if __name__ == "__main__":
|
| 422 |
HOT_RELOAD = os.getenv("HOT_RELOAD", "False").lower() == "true"
|
| 423 |
logger.info(f"Starting app with hot reload: {HOT_RELOAD}")
|
| 424 |
-
|
| 425 |
-
# serve(port=7860, reload=HOT_RELOAD)
|
|
|
|
| 24 |
Script,
|
| 25 |
StreamingResponse,
|
| 26 |
fast_app,
|
| 27 |
+
serve,
|
| 28 |
)
|
| 29 |
from PIL import Image
|
| 30 |
from shad4fast import ShadHead
|
|
|
|
| 43 |
SimMapButtonReady,
|
| 44 |
)
|
| 45 |
from frontend.layout import Layout
|
|
|
|
| 46 |
|
| 47 |
highlight_js_theme_link = Link(id="highlight-theme", rel="stylesheet", href="")
|
| 48 |
highlight_js_theme = Script(src="/static/js/highlightjs-theme.js")
|
|
|
|
| 68 |
awesomplete_js = Script(
|
| 69 |
src="https://cdnjs.cloudflare.com/ajax/libs/awesomplete/1.1.7/awesomplete.min.js"
|
| 70 |
)
|
| 71 |
+
sselink = Script(src="https://unpkg.com/[email protected]/sse.js")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
# Get log level from environment variable, default to INFO
|
| 74 |
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper()
|
|
|
|
| 112 |
Do NOT include backticks (`) in your response. Only simple HTML tags and text.
|
| 113 |
"""
|
| 114 |
gemini_model = genai.GenerativeModel(
|
| 115 |
+
"gemini-2.0-flash", system_instruction=GEMINI_SYSTEM_PROMPT
|
| 116 |
)
|
| 117 |
STATIC_DIR = Path("static")
|
| 118 |
IMG_DIR = STATIC_DIR / "full_images"
|
|
|
|
| 417 |
if __name__ == "__main__":
|
| 418 |
HOT_RELOAD = os.getenv("HOT_RELOAD", "False").lower() == "true"
|
| 419 |
logger.info(f"Starting app with hot reload: {HOT_RELOAD}")
|
| 420 |
+
serve(port=7860, reload=HOT_RELOAD)
|
|
|
static/sim_maps/-8752960445958399872_0_10.png
ADDED
|
static/sim_maps/-8752960445958399872_0_11.png
ADDED
|
static/sim_maps/-8752960445958399872_0_12.png
ADDED
|
static/sim_maps/-8752960445958399872_0_13.png
ADDED
|
static/sim_maps/-8752960445958399872_0_15.png
ADDED
|
static/sim_maps/-8752960445958399872_0_16.png
ADDED
|
static/sim_maps/-8752960445958399872_0_17.png
ADDED
|
static/sim_maps/-8752960445958399872_0_18.png
ADDED
|
static/sim_maps/-8752960445958399872_0_3.png
ADDED
|
static/sim_maps/-8752960445958399872_0_4.png
ADDED
|
static/sim_maps/-8752960445958399872_0_5.png
ADDED
|
static/sim_maps/-8752960445958399872_0_6.png
ADDED
|
static/sim_maps/-8752960445958399872_0_8.png
ADDED
|
static/sim_maps/-8752960445958399872_0_9.png
ADDED
|
static/sim_maps/-8752960445958399872_1_10.png
ADDED
|
static/sim_maps/-8752960445958399872_1_11.png
ADDED
|
static/sim_maps/-8752960445958399872_1_12.png
ADDED
|
static/sim_maps/-8752960445958399872_1_13.png
ADDED
|
static/sim_maps/-8752960445958399872_1_15.png
ADDED
|
static/sim_maps/-8752960445958399872_1_16.png
ADDED
|
static/sim_maps/-8752960445958399872_1_17.png
ADDED
|
static/sim_maps/-8752960445958399872_1_18.png
ADDED
|
static/sim_maps/-8752960445958399872_1_3.png
ADDED
|
static/sim_maps/-8752960445958399872_1_4.png
ADDED
|
static/sim_maps/-8752960445958399872_1_5.png
ADDED
|
static/sim_maps/-8752960445958399872_1_6.png
ADDED
|
static/sim_maps/-8752960445958399872_1_8.png
ADDED
|
static/sim_maps/-8752960445958399872_1_9.png
ADDED
|
static/sim_maps/-8752960445958399872_2_10.png
ADDED
|
static/sim_maps/-8752960445958399872_2_11.png
ADDED
|
static/sim_maps/-8752960445958399872_2_12.png
ADDED
|
static/sim_maps/-8752960445958399872_2_13.png
ADDED
|
static/sim_maps/-8752960445958399872_2_15.png
ADDED
|
static/sim_maps/-8752960445958399872_2_16.png
ADDED
|
static/sim_maps/-8752960445958399872_2_17.png
ADDED
|
static/sim_maps/-8752960445958399872_2_18.png
ADDED
|
static/sim_maps/-8752960445958399872_2_3.png
ADDED
|
static/sim_maps/-8752960445958399872_2_4.png
ADDED
|
static/sim_maps/-8752960445958399872_2_5.png
ADDED
|
static/sim_maps/-8752960445958399872_2_6.png
ADDED
|
static/sim_maps/-8752960445958399872_2_8.png
ADDED
|
static/sim_maps/-8752960445958399872_2_9.png
ADDED
|