ncoop57
commited on
Commit
•
8f55818
1
Parent(s):
a534107
Don't make auto obj every time, just clear it
Browse files
app.py
CHANGED
@@ -4,10 +4,14 @@ import gradio as gr
|
|
4 |
|
5 |
from autocards.autocards import Autocards
|
6 |
|
|
|
|
|
7 |
def cardify(content):
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
with open("output_basic.json") as f:
|
12 |
res = json.load(f)
|
13 |
|
|
|
4 |
|
5 |
from autocards.autocards import Autocards
|
6 |
|
7 |
+
AUTO = Autocards()
|
8 |
+
|
9 |
def cardify(content):
|
10 |
+
global AUTO
|
11 |
+
|
12 |
+
AUTO.clear_qa()
|
13 |
+
AUTO.consume_var(content)
|
14 |
+
AUTO.to_json("output.json", prefix="")
|
15 |
with open("output_basic.json") as f:
|
16 |
res = json.load(f)
|
17 |
|