Spaces:
Sleeping
Sleeping
solv assertion error
Browse files- app.py +2 -2
- inference.py +1 -1
app.py
CHANGED
@@ -6,7 +6,7 @@ from inference import Inference
|
|
6 |
inference = Inference()
|
7 |
|
8 |
|
9 |
-
|
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 |
-
|
|
|
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
|
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":
|