Add import
Browse files
app.py
CHANGED
@@ -5,6 +5,8 @@ import gradio as gr
|
|
5 |
import click
|
6 |
from rasa.nlu.model import Interpreter
|
7 |
|
|
|
|
|
8 |
|
9 |
# Rasa intent + entity extractor
|
10 |
RASA_MODEL_PATH = "woz_nlu_agent/models/nlu"
|
@@ -31,7 +33,6 @@ def predict(model_type, input):
|
|
31 |
|
32 |
|
33 |
def oos_predict(input):
|
34 |
-
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
35 |
inputs = tokenizer(input, return_tensors="pt")
|
36 |
outputs = model(**inputs)
|
37 |
return str(outputs)
|
|
|
5 |
import click
|
6 |
from rasa.nlu.model import Interpreter
|
7 |
|
8 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
9 |
+
|
10 |
|
11 |
# Rasa intent + entity extractor
|
12 |
RASA_MODEL_PATH = "woz_nlu_agent/models/nlu"
|
|
|
33 |
|
34 |
|
35 |
def oos_predict(input):
|
|
|
36 |
inputs = tokenizer(input, return_tensors="pt")
|
37 |
outputs = model(**inputs)
|
38 |
return str(outputs)
|