Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -329,13 +329,11 @@ async def predict(image):
|
|
329 |
</h2>
|
330 |
<div class="info-section">
|
331 |
<div class="info-item">
|
332 |
-
<span class="tooltip">
|
333 |
-
<span class="tooltip tooltip-right">
|
334 |
<span class="icon">📏</span>
|
335 |
<span class="label">Size:</span>
|
336 |
<span class="tooltip-icon">ⓘ</span>
|
337 |
<span class="tooltip-text">
|
338 |
-
<span class="tooltip tooltip-left">
|
339 |
<strong>Size Categories:</strong><br>
|
340 |
• Small: Under 20 pounds<br>
|
341 |
• Medium: 20-60 pounds<br>
|
@@ -384,12 +382,11 @@ async def predict(image):
|
|
384 |
</h2>
|
385 |
<div class="care-section">
|
386 |
<div class="info-item">
|
387 |
-
<span class="tooltip">
|
388 |
<span class="icon">🏃</span>
|
389 |
<span class="label">Exercise:</span>
|
390 |
<span class="tooltip-icon">ⓘ</span>
|
391 |
<span class="tooltip-text">
|
392 |
-
<span class="tooltip tooltip-left">
|
393 |
<strong>Exercise Needs:</strong><br>
|
394 |
• Low: Short walks and play sessions<br>
|
395 |
• Moderate: 1-2 hours of daily activity<br>
|
@@ -768,23 +765,34 @@ async def predict(image):
|
|
768 |
padding: 15px;
|
769 |
position: absolute;
|
770 |
z-index: 100;
|
771 |
-
bottom:
|
772 |
-
left:
|
|
|
773 |
opacity: 0;
|
774 |
transition: all 0.3s ease;
|
775 |
font-size: 14px;
|
776 |
line-height: 1.6;
|
777 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
778 |
-
border: 1px solid rgba(255, 255, 255, 0.1)
|
|
|
779 |
}}
|
780 |
|
781 |
.tooltip.tooltip-left .tooltip-text {{
|
782 |
left: 0;
|
|
|
783 |
}}
|
784 |
|
785 |
.tooltip.tooltip-right .tooltip-text {{
|
786 |
left: auto;
|
787 |
right: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
788 |
}}
|
789 |
|
790 |
.tooltip .tooltip-text::after {{
|
@@ -798,6 +806,15 @@ async def predict(image):
|
|
798 |
border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
|
799 |
}}
|
800 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
801 |
.tooltip:hover .tooltip-text {{
|
802 |
visibility: visible;
|
803 |
opacity: 1;
|
@@ -808,10 +825,10 @@ async def predict(image):
|
|
808 |
position: absolute;
|
809 |
top: 100%;
|
810 |
left: 50%;
|
811 |
-
|
812 |
-
border-width:
|
813 |
border-style: solid;
|
814 |
-
border-color:
|
815 |
}}
|
816 |
</style>
|
817 |
{dogs_info}
|
|
|
329 |
</h2>
|
330 |
<div class="info-section">
|
331 |
<div class="info-item">
|
332 |
+
<span class="tooltip tooltip-left">
|
|
|
333 |
<span class="icon">📏</span>
|
334 |
<span class="label">Size:</span>
|
335 |
<span class="tooltip-icon">ⓘ</span>
|
336 |
<span class="tooltip-text">
|
|
|
337 |
<strong>Size Categories:</strong><br>
|
338 |
• Small: Under 20 pounds<br>
|
339 |
• Medium: 20-60 pounds<br>
|
|
|
382 |
</h2>
|
383 |
<div class="care-section">
|
384 |
<div class="info-item">
|
385 |
+
<span class="tooltip tooltip-left">
|
386 |
<span class="icon">🏃</span>
|
387 |
<span class="label">Exercise:</span>
|
388 |
<span class="tooltip-icon">ⓘ</span>
|
389 |
<span class="tooltip-text">
|
|
|
390 |
<strong>Exercise Needs:</strong><br>
|
391 |
• Low: Short walks and play sessions<br>
|
392 |
• Moderate: 1-2 hours of daily activity<br>
|
|
|
765 |
padding: 15px;
|
766 |
position: absolute;
|
767 |
z-index: 100;
|
768 |
+
bottom: 150%;
|
769 |
+
left: 50%;
|
770 |
+
transform: translateX(-50%);
|
771 |
opacity: 0;
|
772 |
transition: all 0.3s ease;
|
773 |
font-size: 14px;
|
774 |
line-height: 1.6;
|
775 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
|
776 |
+
border: 1px solid rgba(255, 255, 255, 0.1)
|
777 |
+
margin-bottom: 10px;
|
778 |
}}
|
779 |
|
780 |
.tooltip.tooltip-left .tooltip-text {{
|
781 |
left: 0;
|
782 |
+
transform: translateX(0);
|
783 |
}}
|
784 |
|
785 |
.tooltip.tooltip-right .tooltip-text {{
|
786 |
left: auto;
|
787 |
right: 0;
|
788 |
+
transform: translateX(0);
|
789 |
+
}}
|
790 |
+
|
791 |
+
.tooltip-text strong {{
|
792 |
+
color: white !important; /* 確保文字為白色 */
|
793 |
+
background-color: transparent !important; /* 移除背景色 */
|
794 |
+
display: block; /* 讓標題獨立一行 */
|
795 |
+
margin-bottom: 8px; /* 增加標題下方間距 */
|
796 |
}}
|
797 |
|
798 |
.tooltip .tooltip-text::after {{
|
|
|
806 |
border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
|
807 |
}}
|
808 |
|
809 |
+
.tooltip-left .tooltip-text::after {{
|
810 |
+
left: 20%;
|
811 |
+
}}
|
812 |
+
|
813 |
+
/* 右側箭頭 */
|
814 |
+
.tooltip-right .tooltip-text::after {{
|
815 |
+
left: 80%;
|
816 |
+
}}
|
817 |
+
|
818 |
.tooltip:hover .tooltip-text {{
|
819 |
visibility: visible;
|
820 |
opacity: 1;
|
|
|
825 |
position: absolute;
|
826 |
top: 100%;
|
827 |
left: 50%;
|
828 |
+
transform: translateX(-50%);
|
829 |
+
border-width: 8px;
|
830 |
border-style: solid;
|
831 |
+
border-color: rgba(44, 62, 80, 0.95) transparent transparent transparent;
|
832 |
}}
|
833 |
</style>
|
834 |
{dogs_info}
|