Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -127,21 +127,20 @@ class Measurer:
|
|
127 |
return f1, f2, f3, f4
|
128 |
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
iface.launch()
|
|
|
127 |
return f1, f2, f3, f4
|
128 |
|
129 |
|
130 |
+
m = Measurer()
|
131 |
+
iso_to_name = load_json_from_path("iso_to_fullname.json")
|
132 |
+
text_selection = [f"{iso_to_name[iso_code]} ({iso_code})" for iso_code in iso_to_name]
|
133 |
+
iface = gr.Interface(fn=m.measure,
|
134 |
+
inputs=[gr.Dropdown(text_selection,
|
135 |
+
type="value",
|
136 |
+
value='English (eng)',
|
137 |
+
label="Select the fist Language (type on your keyboard to find it quickly)"),
|
138 |
+
gr.Dropdown(text_selection,
|
139 |
+
type="value",
|
140 |
+
value='German (deu)',
|
141 |
+
label="Select the second Language (type on your keyboard to find it quickly)")],
|
142 |
+
outputs=[gr.Plot(),
|
143 |
+
gr.Plot(),
|
144 |
+
gr.Plot(),
|
145 |
+
gr.Plot()])
|
146 |
+
iface.launch()
|
|