Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,12 +16,7 @@ processors = {
|
|
| 16 |
'gokaygokay/Florence-2-Flux': AutoProcessor.from_pretrained('gokaygokay/Florence-2-Flux', trust_remote_code=True),
|
| 17 |
}
|
| 18 |
|
| 19 |
-
|
| 20 |
-
<p><center>
|
| 21 |
-
<a href="https://huggingface.co/gokaygokay/Florence-2-Flux-Large" target="_blank">[Florence-2 Flux Large]</a>
|
| 22 |
-
<a href="https://huggingface.co/gokaygokay/Florence-2-Flux" target="_blank">[Florence-2 Flux Base]</a>
|
| 23 |
-
</center></p>
|
| 24 |
-
"""
|
| 25 |
|
| 26 |
@spaces.GPU
|
| 27 |
def run_example(image, model_name='gokaygokay/Florence-2-Flux-Large'):
|
|
@@ -47,8 +42,14 @@ def run_example(image, model_name='gokaygokay/Florence-2-Flux-Large'):
|
|
| 47 |
parsed_answer = processor.post_process_generation(generated_text, task=task_prompt, image_size=(image.width, image.height))
|
| 48 |
return parsed_answer["<DESCRIPTION>"]
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
with gr.Row():
|
| 54 |
with gr.Column():
|
|
|
|
| 16 |
'gokaygokay/Florence-2-Flux': AutoProcessor.from_pretrained('gokaygokay/Florence-2-Flux', trust_remote_code=True),
|
| 17 |
}
|
| 18 |
|
| 19 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
@spaces.GPU
|
| 22 |
def run_example(image, model_name='gokaygokay/Florence-2-Flux-Large'):
|
|
|
|
| 42 |
parsed_answer = processor.post_process_generation(generated_text, task=task_prompt, image_size=(image.width, image.height))
|
| 43 |
return parsed_answer["<DESCRIPTION>"]
|
| 44 |
|
| 45 |
+
css = """
|
| 46 |
+
footer {
|
| 47 |
+
visibility: hidden;
|
| 48 |
+
}
|
| 49 |
+
"""
|
| 50 |
+
|
| 51 |
+
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
| 52 |
+
|
| 53 |
|
| 54 |
with gr.Row():
|
| 55 |
with gr.Column():
|