Print json
Browse files
app.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
from pprint import pprint, pformat
|
|
|
|
|
2 |
import gradio as gr
|
3 |
import click
|
4 |
from rasa.nlu.model import Interpreter
|
@@ -36,8 +38,11 @@ def predict(input):
|
|
36 |
def main():
|
37 |
global interpreter
|
38 |
print("Loading model...")
|
39 |
-
import os
|
40 |
print(os.listdir("woz_nlu_agent/models/nlu"))
|
|
|
|
|
|
|
|
|
41 |
interpreter = Interpreter.load(MODEL_PATH)
|
42 |
print("Model loaded.")
|
43 |
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|
|
|
1 |
from pprint import pprint, pformat
|
2 |
+
import os
|
3 |
+
|
4 |
import gradio as gr
|
5 |
import click
|
6 |
from rasa.nlu.model import Interpreter
|
|
|
38 |
def main():
|
39 |
global interpreter
|
40 |
print("Loading model...")
|
|
|
41 |
print(os.listdir("woz_nlu_agent/models/nlu"))
|
42 |
+
print(open("woz_nlu_agent/models/nlu/metadata.json", "r").read())
|
43 |
+
import json
|
44 |
+
print(json.load(open("woz_nlu_agent/models/nlu/metadata.json", "r")))
|
45 |
+
|
46 |
interpreter = Interpreter.load(MODEL_PATH)
|
47 |
print("Model loaded.")
|
48 |
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|