Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -441,7 +441,11 @@ with st.spinner('Wait for it...'):
|
|
441 |
vector_store.append((embedding, chunk.page_content) )
|
442 |
|
443 |
else:
|
444 |
-
|
|
|
|
|
|
|
|
|
445 |
|
446 |
|
447 |
canvas_result = st_canvas(
|
@@ -451,8 +455,8 @@ with st.spinner('Wait for it...'):
|
|
451 |
background_color=bg_color,
|
452 |
background_image=gen_image if gen_image else Image.open("/home/user/app/ALL_image_formation/image_gen.png"),
|
453 |
update_streamlit=True,
|
454 |
-
height=
|
455 |
-
width=
|
456 |
drawing_mode=drawing_mode,
|
457 |
point_display_radius=point_display_radius if drawing_mode == 'point' else 0,
|
458 |
key="canvas",
|
|
|
441 |
vector_store.append((embedding, chunk.page_content) )
|
442 |
|
443 |
else:
|
444 |
+
if screen_width==485:
|
445 |
+
screen_width = screen_width//1.2
|
446 |
+
else:
|
447 |
+
screen_width = int(screen_width//2.3) if screen_width!=820 else screen_width//2
|
448 |
+
screen_height = int(screen_height//2.16) if screen_height!=1180 else screen_height//2
|
449 |
|
450 |
|
451 |
canvas_result = st_canvas(
|
|
|
455 |
background_color=bg_color,
|
456 |
background_image=gen_image if gen_image else Image.open("/home/user/app/ALL_image_formation/image_gen.png"),
|
457 |
update_streamlit=True,
|
458 |
+
height=screen_height,
|
459 |
+
width=screen_width,
|
460 |
drawing_mode=drawing_mode,
|
461 |
point_display_radius=point_display_radius if drawing_mode == 'point' else 0,
|
462 |
key="canvas",
|