Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import gradio as gr
|
|
| 3 |
import torch
|
| 4 |
from utils.tools_gradio import fast_process
|
| 5 |
from utils.tools import format_results, box_prompt, point_prompt, text_prompt
|
| 6 |
-
from PIL import ImageDraw
|
| 7 |
import numpy as np
|
| 8 |
import matplotlib.pyplot as plt
|
| 9 |
import matplotlib.patches as patches
|
|
@@ -61,7 +61,7 @@ def segment_everything(
|
|
| 61 |
print(f"Largest Box {i+1}: {box.tolist()}")
|
| 62 |
|
| 63 |
fig, ax = plt.subplots(1)
|
| 64 |
-
ax.imshow(
|
| 65 |
|
| 66 |
for box in largest_boxes:
|
| 67 |
x1, y1, x2, y2 = box[:4]
|
|
|
|
| 3 |
import torch
|
| 4 |
from utils.tools_gradio import fast_process
|
| 5 |
from utils.tools import format_results, box_prompt, point_prompt, text_prompt
|
| 6 |
+
from PIL import ImageDraw,Image
|
| 7 |
import numpy as np
|
| 8 |
import matplotlib.pyplot as plt
|
| 9 |
import matplotlib.patches as patches
|
|
|
|
| 61 |
print(f"Largest Box {i+1}: {box.tolist()}")
|
| 62 |
|
| 63 |
fig, ax = plt.subplots(1)
|
| 64 |
+
ax.imshow(input)
|
| 65 |
|
| 66 |
for box in largest_boxes:
|
| 67 |
x1, y1, x2, y2 = box[:4]
|