Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from transformers import pipeline
|
|
| 10 |
import ast
|
| 11 |
pipe = pipeline("zero-shot-image-classification", model="patrickjohncyh/fashion-clip")
|
| 12 |
|
| 13 |
-
file_path = '
|
| 14 |
|
| 15 |
# Open and read the JSON file
|
| 16 |
with open(file_path, 'r') as file:
|
|
@@ -26,7 +26,7 @@ def shot(input, category):
|
|
| 26 |
"colors":{
|
| 27 |
"main":mainColour,
|
| 28 |
"sub":subColour,
|
| 29 |
-
|
| 30 |
}
|
| 31 |
}
|
| 32 |
|
|
|
|
| 10 |
import ast
|
| 11 |
pipe = pipeline("zero-shot-image-classification", model="patrickjohncyh/fashion-clip")
|
| 12 |
|
| 13 |
+
file_path = 'color_config.json'
|
| 14 |
|
| 15 |
# Open and read the JSON file
|
| 16 |
with open(file_path, 'r') as file:
|
|
|
|
| 26 |
"colors":{
|
| 27 |
"main":mainColour,
|
| 28 |
"sub":subColour,
|
| 29 |
+
"score":round(score*100,2)
|
| 30 |
}
|
| 31 |
}
|
| 32 |
|