Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -109,14 +109,49 @@ body { font-family: 'Open Sans', sans-serif !important; }
|
|
109 |
}
|
110 |
.model-selector {
|
111 |
display: flex;
|
112 |
-
gap:
|
113 |
margin-bottom: 1rem;
|
114 |
}
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
"""
|
122 |
|
@@ -129,14 +164,17 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
129 |
|
130 |
with gr.Row(elem_classes="model-selector"):
|
131 |
with gr.Column(scale=1):
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
140 |
|
141 |
with gr.Row():
|
142 |
with gr.Column(scale=1):
|
|
|
109 |
}
|
110 |
.model-selector {
|
111 |
display: flex;
|
112 |
+
gap: 8px;
|
113 |
margin-bottom: 1rem;
|
114 |
}
|
115 |
+
#model-buttons .gr-form {
|
116 |
+
background: transparent !important;
|
117 |
+
border: none !important;
|
118 |
+
box-shadow: none !important;
|
119 |
+
}
|
120 |
+
#model-buttons .gr-radio-row {
|
121 |
+
gap: 8px !important;
|
122 |
+
}
|
123 |
+
#model-buttons label {
|
124 |
+
display: flex !important;
|
125 |
+
align-items: center !important;
|
126 |
+
gap: 4px !important;
|
127 |
+
padding: 4px 12px !important;
|
128 |
+
border: 1px solid #e5e7eb !important;
|
129 |
+
border-radius: 6px !important;
|
130 |
+
font-size: 14px !important;
|
131 |
+
cursor: pointer !important;
|
132 |
+
transition: all 0.2s !important;
|
133 |
+
}
|
134 |
+
#model-buttons label:hover {
|
135 |
+
background-color: #f3f4f6 !important;
|
136 |
+
}
|
137 |
+
#model-buttons label.selected {
|
138 |
+
background-color: #4c4ce3 !important;
|
139 |
+
color: white !important;
|
140 |
+
border-color: #4c4ce3 !important;
|
141 |
+
}
|
142 |
+
#model-buttons label:before {
|
143 |
+
content: "" !important;
|
144 |
+
width: 20px !important;
|
145 |
+
height: 20px !important;
|
146 |
+
background-size: contain !important;
|
147 |
+
background-repeat: no-repeat !important;
|
148 |
+
background-position: center !important;
|
149 |
+
}
|
150 |
+
#model-buttons label:nth-child(1):before {
|
151 |
+
background-image: url('img/gemini-icon.png') !important;
|
152 |
+
}
|
153 |
+
#model-buttons label:nth-child(2):before {
|
154 |
+
background-image: url('img/openai-icon.png') !important;
|
155 |
}
|
156 |
"""
|
157 |
|
|
|
164 |
|
165 |
with gr.Row(elem_classes="model-selector"):
|
166 |
with gr.Column(scale=1):
|
167 |
+
with gr.Row():
|
168 |
+
model_choice = gr.Radio(
|
169 |
+
choices=["Gemini", "OpenAI"],
|
170 |
+
value="Gemini",
|
171 |
+
label="",
|
172 |
+
elem_classes="model-selector",
|
173 |
+
elem_id="model-buttons",
|
174 |
+
container=False,
|
175 |
+
interactive=True
|
176 |
+
)
|
177 |
+
|
178 |
|
179 |
with gr.Row():
|
180 |
with gr.Column(scale=1):
|