wiusdy commited on
Commit
658f534
1 Parent(s): 2f0b540

solv assertion error

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. inference.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ from inference import Inference
6
  inference = Inference()
7
 
8
 
9
- iface = gr.Interface(
10
  fn=inference.inference,
11
  inputs=gr.Blocks([
12
  gr.Dropdown(choices=["Model 1", "Model 2", "Model 3"], label="Models", info="Select the model to use..", ),
@@ -19,4 +19,4 @@ iface = gr.Interface(
19
 
20
 
21
  if __name__ == "__main__":
22
- iface.launch()
 
6
  inference = Inference()
7
 
8
 
9
+ interface = gr.Interface(
10
  fn=inference.inference,
11
  inputs=gr.Blocks([
12
  gr.Dropdown(choices=["Model 1", "Model 2", "Model 3"], label="Models", info="Select the model to use..", ),
 
19
 
20
 
21
  if __name__ == "__main__":
22
+ interface.launch()
inference.py CHANGED
@@ -8,7 +8,7 @@ class Inference:
8
  self.deplot_processor = Pix2StructProcessor.from_pretrained('google/deplot')
9
  self.deplot_model = Pix2StructForConditionalGeneration.from_pretrained('google/deplot')
10
 
11
- def inference(self, image, text, selected):
12
  if selected == "Model 1":
13
  return self.__inference_deplot(image, text)
14
  elif selected == "Model 2":
 
8
  self.deplot_processor = Pix2StructProcessor.from_pretrained('google/deplot')
9
  self.deplot_model = Pix2StructForConditionalGeneration.from_pretrained('google/deplot')
10
 
11
+ def inference(self, selected, image, text):
12
  if selected == "Model 1":
13
  return self.__inference_deplot(image, text)
14
  elif selected == "Model 2":