Spaces:
Runtime error
Runtime error
Commit ·
1f72c54
1
Parent(s): c827fad
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,11 +17,23 @@ model = YOLO('./weights/FastSAM.pt')
|
|
| 17 |
|
| 18 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 19 |
|
| 20 |
-
# Description
|
| 21 |
-
title = "<center><strong><font size='10'> Fast Segment Anything </font></strong></center>"
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
def segment_everything(
|
| 27 |
input,
|
|
|
|
| 17 |
|
| 18 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 19 |
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
icon_html = '<i class="fas fa-chart-bar"></i>'
|
| 22 |
+
title_with_icon = f"""
|
| 23 |
+
<div style="background-color: #f5f1f2; padding: 10px; display: flex; align-items: center;">
|
| 24 |
+
{icon_html} <span style="margin-left: 10px;">Fast Segment Anything - fast sam</span>
|
| 25 |
+
</div>
|
| 26 |
+
"""
|
| 27 |
|
| 28 |
+
description_with_icon = f"""
|
| 29 |
+
<div style="background-color: #f1f1f5; padding: 10px; display: flex; align-items: center;">
|
| 30 |
+
{icon_html}
|
| 31 |
+
<span style="margin-left: 10px;">
|
| 32 |
+
<p><strong>Pre trained Implementation of fast sam</strong></p>
|
| 33 |
+
<p>Note:Please provide the text with respect to what needs to be segmented</p>
|
| 34 |
+
</span>
|
| 35 |
+
</div>
|
| 36 |
+
"""
|
| 37 |
|
| 38 |
def segment_everything(
|
| 39 |
input,
|