Spaces:
Running
Running
jadechoghari
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,23 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def create_display():
|
4 |
+
text = """
|
5 |
+
<div style="text-align: center;">
|
6 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/4/44/Microsoft_logo.svg" alt="Microsoft Logo" style="width: 150px; margin-bottom: 20px;">
|
7 |
+
<div style="font-size: 36px; font-weight: bold;">
|
8 |
+
Try OmniParser in this space:
|
9 |
+
<a href="https://example.com" style="font-size: 36px; color: #007bff; font-weight: bold;">OmniParser Link</a>
|
10 |
+
</div>
|
11 |
+
</div>
|
12 |
+
"""
|
13 |
+
return text
|
14 |
+
|
15 |
+
with gr.Blocks() as app:
|
16 |
+
gr.HTML(create_display)
|
17 |
+
|
18 |
+
try:
|
19 |
+
ignore = gr.Interface.load("models/microsoft/OmniParser")
|
20 |
+
except Exception as e:
|
21 |
+
print(f"Warning: Failed to load model due to {e}. Continuing without model.")
|
22 |
+
|
23 |
+
app.launch()
|