Spaces:
Runtime error
Runtime error
DimaKoshman
commited on
Commit
•
29b19c7
1
Parent(s):
c0fe593
fix
Browse files
app.py
CHANGED
@@ -34,19 +34,18 @@ def gradio_visualize_prediction(string):
|
|
34 |
...
|
35 |
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
interface.launch()
|
|
|
34 |
...
|
35 |
|
36 |
|
37 |
+
config = CONFIG
|
38 |
+
config.pretrained_model_name = "checkpoint"
|
39 |
+
model = build_model(config)
|
40 |
+
|
41 |
+
interface = gradio.Interface(
|
42 |
+
title="Making graphs accessible",
|
43 |
+
description="Generate textual representation of a graph\n"
|
44 |
+
"https://www.kaggle.com/competitions/benetech-making-graphs-accessible",
|
45 |
+
fn=lambda image: predict_string(image, model),
|
46 |
+
inputs="image",
|
47 |
+
outputs="text",
|
48 |
+
examples="examples",
|
49 |
+
)
|
50 |
+
|
51 |
+
interface.launch()
|
|