uptaleend commited on
Commit
2ba2ce6
1 Parent(s): 1faa2f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import argparse
2
  import os
3
- import io
4
- import urllib.request
5
  import gradio as gr
6
  import huggingface_hub
7
  import numpy as np
@@ -175,7 +175,7 @@ class Predictor:
175
  ):
176
  self.load_model(model_repo)
177
 
178
- image = self.prepare_image(Image.open(io.BytesIO(urllib.request.urlopen(image).read())))
179
 
180
  input_name = self.model.get_inputs()[0].name
181
  label_name = self.model.get_outputs()[0].name
 
1
  import argparse
2
  import os
3
+
4
+
5
  import gradio as gr
6
  import huggingface_hub
7
  import numpy as np
 
175
  ):
176
  self.load_model(model_repo)
177
 
178
+ image = self.prepare_image(image)
179
 
180
  input_name = self.model.get_inputs()[0].name
181
  label_name = self.model.get_outputs()[0].name