DerekLiu35 commited on
Commit
3cec83f
1 Parent(s): 70135dd

Update app_gradio/app.py

Browse files
Files changed (1) hide show
  1. app_gradio/app.py +3 -2
app_gradio/app.py CHANGED
@@ -11,7 +11,7 @@ from PIL import ImageStat
11
  from PIL.Image import Image
12
  import requests
13
 
14
- from image_to_fen.fen import ImageToFen
15
  import image_to_fen.util as util
16
 
17
  os.environ["CUDA_VISIBLE_DEVICES"] = "" # do not use GPU
@@ -78,7 +78,8 @@ class PredictorBackend:
78
  self._predict = self._predict_from_endpoint
79
  else:
80
  model = ImageToFen()
81
- self._predict = model.predict
 
82
 
83
  def run(self, image):
84
  pred, metrics = self._predict_with_metrics(image)
 
11
  from PIL.Image import Image
12
  import requests
13
 
14
+ from image_to_fen.fen import ImageToFen, fen_and_image
15
  import image_to_fen.util as util
16
 
17
  os.environ["CUDA_VISIBLE_DEVICES"] = "" # do not use GPU
 
78
  self._predict = self._predict_from_endpoint
79
  else:
80
  model = ImageToFen()
81
+ # self._predict = model.predict
82
+ self._predict = fen_and_image
83
 
84
  def run(self, image):
85
  pred, metrics = self._predict_with_metrics(image)