Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,8 +73,7 @@ def plaintext_to_html(text):
|
|
| 73 |
|
| 74 |
def predict(image, score_threshold: float,
|
| 75 |
model: tf.keras.Model, labels: list[str]) -> dict[str, float]:
|
| 76 |
-
|
| 77 |
-
|
| 78 |
# 将图片内容转换为Pillow.Image对象
|
| 79 |
image = image.convert("RGB")
|
| 80 |
rawimage = image
|
|
@@ -147,7 +146,7 @@ def main():
|
|
| 147 |
func,
|
| 148 |
[
|
| 149 |
gr.Image(label='img'),
|
| 150 |
-
gr.Slider(0, 1, label='Score Threshold'),
|
| 151 |
],
|
| 152 |
[
|
| 153 |
gr.Textbox(label='Output (string)'),
|
|
|
|
| 73 |
|
| 74 |
def predict(image, score_threshold: float,
|
| 75 |
model: tf.keras.Model, labels: list[str]) -> dict[str, float]:
|
| 76 |
+
|
|
|
|
| 77 |
# 将图片内容转换为Pillow.Image对象
|
| 78 |
image = image.convert("RGB")
|
| 79 |
rawimage = image
|
|
|
|
| 146 |
func,
|
| 147 |
[
|
| 148 |
gr.Image(label='img'),
|
| 149 |
+
gr.Slider(0, 1, label='Score Threshold',default=0.5),
|
| 150 |
],
|
| 151 |
[
|
| 152 |
gr.Textbox(label='Output (string)'),
|