Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -96,9 +96,12 @@ def get_model():
|
|
96 |
return model2
|
97 |
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
102 |
|
103 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
104 |
iface.launch()
|
|
|
96 |
return model2
|
97 |
|
98 |
|
99 |
+
model = get_model()
|
100 |
+
|
101 |
+
def greet(seq):
|
102 |
+
processed_seq = Sequence.prepare(seq)
|
103 |
+
raw_prediction = model.predict(processed_seq)
|
104 |
+
return f"Input is {seq}.\nProcessed input is:\n{processed_seq}\n\nModel makes prediction:\n{raw_prediction}"
|
105 |
|
106 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
107 |
iface.launch()
|