Spaces:
Running
on
A10G
Running
on
A10G
pharmapsychotic
commited on
Commit
•
43bc55e
1
Parent(s):
69a2249
Re-arrange blocks in Prompt tab
Browse files
app.py
CHANGED
@@ -137,33 +137,33 @@ ARTICLE = """
|
|
137 |
</div>
|
138 |
"""
|
139 |
|
140 |
-
CSS =
|
141 |
-
#col-container {
|
142 |
-
a {text-decoration-line: underline; font-weight: 600;}
|
143 |
-
.animate-spin {
|
144 |
-
|
145 |
-
}
|
146 |
-
@keyframes spin {
|
147 |
-
|
148 |
-
|
149 |
-
}
|
150 |
-
#share-btn-container {
|
151 |
-
|
152 |
-
}
|
153 |
-
#share-btn {
|
154 |
-
|
155 |
-
}
|
156 |
-
#share-btn * {
|
157 |
-
|
158 |
-
}
|
159 |
-
#share-btn-container div:nth-child(-n+2){
|
160 |
-
|
161 |
-
|
162 |
-
}
|
163 |
-
#share-btn-container .wrap {
|
164 |
-
|
165 |
-
}
|
166 |
-
|
167 |
|
168 |
def analyze_tab():
|
169 |
with gr.Column():
|
@@ -184,9 +184,11 @@ with gr.Blocks(css=CSS) as block:
|
|
184 |
gr.HTML(TITLE)
|
185 |
|
186 |
with gr.Tab("Prompt"):
|
187 |
-
|
188 |
-
|
189 |
-
|
|
|
|
|
190 |
submit_btn = gr.Button("Submit")
|
191 |
output_text = gr.Textbox(label="Output", elem_id="output-txt")
|
192 |
|
|
|
137 |
</div>
|
138 |
"""
|
139 |
|
140 |
+
CSS = """
|
141 |
+
#col-container {margin-left: auto; margin-right: auto;}
|
142 |
+
a {text-decoration-line: underline; font-weight: 600;}
|
143 |
+
.animate-spin {
|
144 |
+
animation: spin 1s linear infinite;
|
145 |
+
}
|
146 |
+
@keyframes spin {
|
147 |
+
from { transform: rotate(0deg); }
|
148 |
+
to { transform: rotate(360deg); }
|
149 |
+
}
|
150 |
+
#share-btn-container {
|
151 |
+
display: flex; padding-left: 0.5rem !important; padding-right: 0.5rem !important; background-color: #000000; justify-content: center; align-items: center; border-radius: 9999px !important; width: 13rem;
|
152 |
+
}
|
153 |
+
#share-btn {
|
154 |
+
all: initial; color: #ffffff;font-weight: 600; cursor:pointer; font-family: 'IBM Plex Sans', sans-serif; margin-left: 0.5rem !important; padding-top: 0.25rem !important; padding-bottom: 0.25rem !important;
|
155 |
+
}
|
156 |
+
#share-btn * {
|
157 |
+
all: unset;
|
158 |
+
}
|
159 |
+
#share-btn-container div:nth-child(-n+2){
|
160 |
+
width: auto !important;
|
161 |
+
min-height: 0px !important;
|
162 |
+
}
|
163 |
+
#share-btn-container .wrap {
|
164 |
+
display: none !important;
|
165 |
+
}
|
166 |
+
"""
|
167 |
|
168 |
def analyze_tab():
|
169 |
with gr.Column():
|
|
|
184 |
gr.HTML(TITLE)
|
185 |
|
186 |
with gr.Tab("Prompt"):
|
187 |
+
with gr.Row():
|
188 |
+
input_image = gr.Image(type='pil', elem_id="input-img")
|
189 |
+
with gr.Column():
|
190 |
+
input_model = gr.Dropdown(MODELS, value=MODELS[0], label='CLIP Model')
|
191 |
+
input_mode = gr.Radio(['best', 'fast', 'classic', 'negative'], value='best', label='Mode')
|
192 |
submit_btn = gr.Button("Submit")
|
193 |
output_text = gr.Textbox(label="Output", elem_id="output-txt")
|
194 |
|