Spaces:
Running
on
Zero
Running
on
Zero
cutechicken
commited on
Commit
โข
6d46b35
1
Parent(s):
7f1dbfb
Update app.py
Browse files
app.py
CHANGED
@@ -416,14 +416,13 @@ body {
|
|
416 |
transform: scale(1.2);
|
417 |
}
|
418 |
|
419 |
-
|
420 |
.chat-container {
|
421 |
-
height:
|
422 |
margin-bottom: 10px;
|
423 |
}
|
424 |
|
425 |
.input-container {
|
426 |
-
height:
|
427 |
display: flex;
|
428 |
align-items: center;
|
429 |
gap: 10px;
|
@@ -435,12 +434,13 @@ body {
|
|
435 |
color: white;
|
436 |
border-radius: 8px;
|
437 |
padding: 8px 12px;
|
438 |
-
font-size:
|
439 |
cursor: pointer;
|
440 |
display: flex;
|
441 |
align-items: center;
|
442 |
-
|
443 |
-
height:
|
|
|
444 |
transition: all 0.3s ease;
|
445 |
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
446 |
}
|
@@ -450,48 +450,40 @@ body {
|
|
450 |
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
451 |
}
|
452 |
|
453 |
-
.file-upload-icon svg {
|
454 |
-
width: 20px;
|
455 |
-
height: 20px;
|
456 |
-
}
|
457 |
-
|
458 |
.input-textbox {
|
459 |
-
height:
|
460 |
border-radius: 8px !important;
|
|
|
461 |
}
|
462 |
|
463 |
.send-button {
|
464 |
-
height:
|
465 |
-
min-width:
|
|
|
466 |
}
|
467 |
|
468 |
/* ํ์ผ ์
๋ก๋ ๋ฒํผ ์ปจํ
์ด๋ */
|
469 |
.file-upload-container {
|
470 |
display: flex;
|
471 |
align-items: center;
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
/* ํ์ผ ์
๋ก๋ ํ
์คํธ */
|
476 |
-
.file-upload-text {
|
477 |
-
font-size: 0.8em;
|
478 |
-
margin-left: 5px;
|
479 |
-
color: #ffffff;
|
480 |
}
|
481 |
"""
|
482 |
|
483 |
-
|
|
|
484 |
with gr.Blocks(css=CSS) as demo:
|
485 |
with gr.Column():
|
486 |
chatbot = gr.Chatbot(
|
487 |
value=[],
|
488 |
-
height=
|
489 |
label="GiniGEN AI Assistant",
|
490 |
elem_classes="chat-container"
|
491 |
)
|
492 |
|
493 |
with gr.Row(elem_classes="input-container"):
|
494 |
-
with gr.Column(scale=1, min_width=
|
495 |
file_upload = gr.File(
|
496 |
label="๐",
|
497 |
type="filepath",
|
@@ -500,10 +492,6 @@ with gr.Blocks(css=CSS) as demo:
|
|
500 |
container=True,
|
501 |
interactive=True,
|
502 |
)
|
503 |
-
gr.Markdown(
|
504 |
-
"Txt/Csv/Parquet",
|
505 |
-
elem_classes="file-upload-text"
|
506 |
-
)
|
507 |
|
508 |
with gr.Column(scale=4):
|
509 |
msg = gr.Textbox(
|
@@ -514,7 +502,7 @@ with gr.Blocks(css=CSS) as demo:
|
|
514 |
scale=1
|
515 |
)
|
516 |
|
517 |
-
with gr.Column(scale=1, min_width=
|
518 |
send = gr.Button(
|
519 |
"์ ์ก",
|
520 |
elem_classes="send-button custom-button",
|
@@ -562,7 +550,7 @@ with gr.Blocks(css=CSS) as demo:
|
|
562 |
inputs=msg
|
563 |
)
|
564 |
|
565 |
-
# ์ด๋ฒคํธ ๋ฐ์ธ๋ฉ
|
566 |
msg.submit(
|
567 |
stream_chat,
|
568 |
inputs=[msg, chatbot, file_upload, temperature, max_new_tokens, top_p, top_k, penalty],
|
@@ -588,4 +576,4 @@ with gr.Blocks(css=CSS) as demo:
|
|
588 |
)
|
589 |
|
590 |
if __name__ == "__main__":
|
591 |
-
demo.launch()
|
|
|
416 |
transform: scale(1.2);
|
417 |
}
|
418 |
|
|
|
419 |
.chat-container {
|
420 |
+
height: 600px !important; /* ์ฑํ
์ฐฝ ๋์ด ๊ฐ์ */
|
421 |
margin-bottom: 10px;
|
422 |
}
|
423 |
|
424 |
.input-container {
|
425 |
+
height: 70px !important; /* ์
๋ ฅ์ฐฝ ๋์ด ์ฆ๊ฐ */
|
426 |
display: flex;
|
427 |
align-items: center;
|
428 |
gap: 10px;
|
|
|
434 |
color: white;
|
435 |
border-radius: 8px;
|
436 |
padding: 8px 12px;
|
437 |
+
font-size: 1.2em; /* ์์ด์ฝ ํฌ๊ธฐ ์ฝ๊ฐ ์ฆ๊ฐ */
|
438 |
cursor: pointer;
|
439 |
display: flex;
|
440 |
align-items: center;
|
441 |
+
justify-content: center;
|
442 |
+
height: 50px; /* ๋์ด ์ฆ๊ฐ */
|
443 |
+
width: 50px; /* ๋๋น ์ค์ */
|
444 |
transition: all 0.3s ease;
|
445 |
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
446 |
}
|
|
|
450 |
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
451 |
}
|
452 |
|
|
|
|
|
|
|
|
|
|
|
453 |
.input-textbox {
|
454 |
+
height: 70px !important; /* ์
๋ ฅ์ฐฝ ๋์ด ์ฆ๊ฐ */
|
455 |
border-radius: 8px !important;
|
456 |
+
font-size: 1.1em !important; /* ํฐํธ ํฌ๊ธฐ ์ฝ๊ฐ ์ฆ๊ฐ */
|
457 |
}
|
458 |
|
459 |
.send-button {
|
460 |
+
height: 50px !important; /* ์ ์ก ๋ฒํผ ๋์ด ์ฆ๊ฐ */
|
461 |
+
min-width: 70px !important;
|
462 |
+
font-size: 1.1em !important;
|
463 |
}
|
464 |
|
465 |
/* ํ์ผ ์
๋ก๋ ๋ฒํผ ์ปจํ
์ด๋ */
|
466 |
.file-upload-container {
|
467 |
display: flex;
|
468 |
align-items: center;
|
469 |
+
justify-content: center;
|
470 |
+
height: 50px;
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
}
|
472 |
"""
|
473 |
|
474 |
+
|
475 |
+
# UI ๊ตฌ์ฑ
|
476 |
with gr.Blocks(css=CSS) as demo:
|
477 |
with gr.Column():
|
478 |
chatbot = gr.Chatbot(
|
479 |
value=[],
|
480 |
+
height=600, # ์ฑํ
์ฐฝ ๋์ด ๊ฐ์
|
481 |
label="GiniGEN AI Assistant",
|
482 |
elem_classes="chat-container"
|
483 |
)
|
484 |
|
485 |
with gr.Row(elem_classes="input-container"):
|
486 |
+
with gr.Column(scale=1, min_width=70):
|
487 |
file_upload = gr.File(
|
488 |
label="๐",
|
489 |
type="filepath",
|
|
|
492 |
container=True,
|
493 |
interactive=True,
|
494 |
)
|
|
|
|
|
|
|
|
|
495 |
|
496 |
with gr.Column(scale=4):
|
497 |
msg = gr.Textbox(
|
|
|
502 |
scale=1
|
503 |
)
|
504 |
|
505 |
+
with gr.Column(scale=1, min_width=70):
|
506 |
send = gr.Button(
|
507 |
"์ ์ก",
|
508 |
elem_classes="send-button custom-button",
|
|
|
550 |
inputs=msg
|
551 |
)
|
552 |
|
553 |
+
# ์ด๋ฒคํธ ๋ฐ์ธ๋ฉ
|
554 |
msg.submit(
|
555 |
stream_chat,
|
556 |
inputs=[msg, chatbot, file_upload, temperature, max_new_tokens, top_p, top_k, penalty],
|
|
|
576 |
)
|
577 |
|
578 |
if __name__ == "__main__":
|
579 |
+
demo.launch()
|