Spaces:
Runtime error
Runtime error
ffreemt
commited on
Commit
•
9726652
1
Parent(s):
7336f82
Update back to SimepleNamespace
Browse files
app.py
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
import os
|
4 |
import time
|
5 |
from dataclasses import asdict, dataclass
|
|
|
6 |
|
7 |
-
# from
|
8 |
-
from typing import Generator
|
9 |
|
10 |
import gradio as gr
|
11 |
from about_time import about_time
|
@@ -30,14 +30,13 @@ if MOSAICML_API_KEY is None:
|
|
30 |
raise ValueError("git environment variable must be set")
|
31 |
|
32 |
|
33 |
-
#
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
ns = Namespace()
|
41 |
|
42 |
|
43 |
def predict0(prompt, bot):
|
|
|
3 |
import os
|
4 |
import time
|
5 |
from dataclasses import asdict, dataclass
|
6 |
+
from types import SimpleNamespace
|
7 |
|
8 |
+
# from typing import Generator
|
|
|
9 |
|
10 |
import gradio as gr
|
11 |
from about_time import about_time
|
|
|
30 |
raise ValueError("git environment variable must be set")
|
31 |
|
32 |
|
33 |
+
# @dataclass
|
34 |
+
# class Namespace:
|
35 |
+
# ns = Namespace()
|
36 |
+
ns = SimpleNamespace(
|
37 |
+
response="",
|
38 |
+
generator=[],
|
39 |
+
)
|
|
|
40 |
|
41 |
|
42 |
def predict0(prompt, bot):
|