Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,10 +32,10 @@ def call(model_name, sentence, is_nominal, verb_form):
|
|
32 |
predicate = toks(pred_idx+1)
|
33 |
verb_form=predicate
|
34 |
pipeline = pipelines[model_name]
|
35 |
-
pipe_out = pipeline(sentence,
|
36 |
predicate_marker=predicate_marker,
|
37 |
predicate_type="nominal" if is_nominal else "verbal",
|
38 |
-
verb_form=verb_form)
|
39 |
return pipe_out["QAs"], pipe_out["generated_text"]
|
40 |
iface = gr.Interface(fn=call,
|
41 |
inputs=[gr.inputs.Radio(choices=models, default=models[0], label="Model"),
|
|
|
32 |
predicate = toks(pred_idx+1)
|
33 |
verb_form=predicate
|
34 |
pipeline = pipelines[model_name]
|
35 |
+
pipe_out = pipeline([sentence],
|
36 |
predicate_marker=predicate_marker,
|
37 |
predicate_type="nominal" if is_nominal else "verbal",
|
38 |
+
verb_form=verb_form)[0]
|
39 |
return pipe_out["QAs"], pipe_out["generated_text"]
|
40 |
iface = gr.Interface(fn=call,
|
41 |
inputs=[gr.inputs.Radio(choices=models, default=models[0], label="Model"),
|