msamogh commited on
Commit
4c94ed1
1 Parent(s): b7549d4

Add import

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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)