Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -68,6 +68,7 @@ def init():
|
|
68 |
OLLAMA_SERVICE_THREAD.start()
|
69 |
print("Giving ollama serve a moment")
|
70 |
time.sleep(10)
|
|
|
71 |
INIT_SIGN = "FINISHED"
|
72 |
|
73 |
def ollama_func(command):
|
@@ -99,7 +100,7 @@ def stream_chat(message: str, history: list, model: str, temperature: float, max
|
|
99 |
ollama_func(message)
|
100 |
else:
|
101 |
if not INIT_SIGN:
|
102 |
-
return "", [(message, "Please
|
103 |
else:
|
104 |
launch()
|
105 |
conversation = []
|
|
|
68 |
OLLAMA_SERVICE_THREAD.start()
|
69 |
print("Giving ollama serve a moment")
|
70 |
time.sleep(10)
|
71 |
+
global INIT_SIGN
|
72 |
INIT_SIGN = "FINISHED"
|
73 |
|
74 |
def ollama_func(command):
|
|
|
100 |
ollama_func(message)
|
101 |
else:
|
102 |
if not INIT_SIGN:
|
103 |
+
return "", [(message, "Please initialize Ollama")]
|
104 |
else:
|
105 |
launch()
|
106 |
conversation = []
|