Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import numpy as np
|
|
| 6 |
import io
|
| 7 |
import base64
|
| 8 |
|
|
|
|
| 9 |
|
| 10 |
# Load CLIPSeg processor and model
|
| 11 |
processor = CLIPSegProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
|
@@ -44,6 +45,9 @@ def get_masks(prompts, img, threshold):
|
|
| 44 |
|
| 45 |
return masks
|
| 46 |
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
# Function to extract image using positive and negative prompts
|
| 49 |
def extract_image(pos_prompts, neg_prompts, img, threshold):
|
|
|
|
| 6 |
import io
|
| 7 |
import base64
|
| 8 |
|
| 9 |
+
app = Flask(__name__)
|
| 10 |
|
| 11 |
# Load CLIPSeg processor and model
|
| 12 |
processor = CLIPSegProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
|
|
|
| 45 |
|
| 46 |
return masks
|
| 47 |
|
| 48 |
+
@app.route('/')
|
| 49 |
+
def hello_world():
|
| 50 |
+
return 'Hello, World!'
|
| 51 |
|
| 52 |
# Function to extract image using positive and negative prompts
|
| 53 |
def extract_image(pos_prompts, neg_prompts, img, threshold):
|