mzltest commited on
Commit
fee44b3
·
verified ·
1 Parent(s): 0daecc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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
- response = requests.get(image_url)
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)'),