Update app.py
Browse files
app.py
CHANGED
@@ -17,15 +17,12 @@ def inference(inputtext, model):
|
|
17 |
return {"error": "The input text must contain the [MASK] token."}
|
18 |
|
19 |
if model == "bert-base-cased":
|
20 |
-
|
21 |
elif model == "bert-base-uncased":
|
22 |
-
|
23 |
else:
|
24 |
return {"error": "Invalid model selected"}
|
25 |
|
26 |
-
return outlabel
|
27 |
-
|
28 |
-
# Aktualisierte Gradio-Syntax
|
29 |
iface = gr.Interface(
|
30 |
fn=inference,
|
31 |
inputs=[
|
|
|
17 |
return {"error": "The input text must contain the [MASK] token."}
|
18 |
|
19 |
if model == "bert-base-cased":
|
20 |
+
return io1(inputtext)
|
21 |
elif model == "bert-base-uncased":
|
22 |
+
return io2(inputtext)
|
23 |
else:
|
24 |
return {"error": "Invalid model selected"}
|
25 |
|
|
|
|
|
|
|
26 |
iface = gr.Interface(
|
27 |
fn=inference,
|
28 |
inputs=[
|