Commit
·
89a569e
1
Parent(s):
0403367
WIP
Browse files
app.py
CHANGED
@@ -1,37 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
-
import websockets
|
3 |
-
import asyncio
|
4 |
-
import json
|
5 |
-
import base64
|
6 |
-
from PIL import Image
|
7 |
-
import io
|
8 |
|
9 |
-
# Updated CSS for better mobile responsiveness
|
10 |
-
css = '''
|
11 |
-
.container {
|
12 |
-
max-width: 100% !important;
|
13 |
-
padding: 1rem !important;
|
14 |
-
}
|
15 |
-
|
16 |
-
.row {
|
17 |
-
flex-direction: column !important;
|
18 |
-
gap: 1rem !important;
|
19 |
-
margin: 0 auto !important;
|
20 |
-
padding: 0.5rem !important;
|
21 |
-
}
|
22 |
-
|
23 |
-
/* Make textboxes full width on mobile */
|
24 |
-
.input-box, .output-box {
|
25 |
-
width: 100% !important;
|
26 |
-
min-width: 100% !important;
|
27 |
-
}
|
28 |
-
'''
|
29 |
|
30 |
def process_image_stream(question):
|
31 |
return "This is a test response"
|
32 |
|
33 |
# Updated Gradio interface
|
34 |
-
demo = gr.Blocks(
|
35 |
|
36 |
with demo:
|
37 |
with gr.Column(): # Changed from Row to Column for better mobile layout
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
def process_image_stream(question):
|
5 |
return "This is a test response"
|
6 |
|
7 |
# Updated Gradio interface
|
8 |
+
demo = gr.Blocks(theme="soft")
|
9 |
|
10 |
with demo:
|
11 |
with gr.Column(): # Changed from Row to Column for better mobile layout
|