Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
# Necessary Imports
|
|
|
|
|
|
|
2 |
import gradio as gr
|
3 |
|
4 |
# Import the necessary functions from the src folder
|
5 |
-
from src.chat import query_message
|
6 |
-
from src.llm_response import llm_response
|
7 |
|
8 |
|
9 |
# HTML Content for the Interface
|
@@ -38,13 +41,29 @@ with gr.Blocks(theme=gr.themes.Soft()) as app:
|
|
38 |
|
39 |
with gr.Row():
|
40 |
# Image UI
|
41 |
-
image_box = gr.Image(type="filepath")
|
42 |
|
43 |
# Chat UI
|
44 |
-
chatbot = gr.Chatbot(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
text_box = gr.Textbox(
|
46 |
placeholder="Enter text and press enter, or upload an image",
|
47 |
-
container=
|
48 |
)
|
49 |
|
50 |
# Button to Submit the Input and Generate Response
|
|
|
1 |
# Necessary Imports
|
2 |
+
import warnings
|
3 |
+
warnings.filterwarnings("ignore")
|
4 |
+
|
5 |
import gradio as gr
|
6 |
|
7 |
# Import the necessary functions from the src folder
|
8 |
+
from src.app.chat import query_message
|
9 |
+
from src.app.llm_response import llm_response
|
10 |
|
11 |
|
12 |
# HTML Content for the Interface
|
|
|
41 |
|
42 |
with gr.Row():
|
43 |
# Image UI
|
44 |
+
image_box = gr.Image(type="filepath", height=750)
|
45 |
|
46 |
# Chat UI
|
47 |
+
chatbot = gr.Chatbot(
|
48 |
+
scale=2,
|
49 |
+
height=750,
|
50 |
+
type="tuples",
|
51 |
+
show_share_button=True,
|
52 |
+
show_copy_button=True,
|
53 |
+
examples=[
|
54 |
+
{
|
55 |
+
"text": "Hello! and welcome to Well Being π¬",
|
56 |
+
"image": None,
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"text": "Chat with me to get started! π",
|
60 |
+
"image": None,
|
61 |
+
},
|
62 |
+
],
|
63 |
+
)
|
64 |
text_box = gr.Textbox(
|
65 |
placeholder="Enter text and press enter, or upload an image",
|
66 |
+
container=True,
|
67 |
)
|
68 |
|
69 |
# Button to Submit the Input and Generate Response
|