Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -78,13 +78,13 @@ def ollama_func(command):
|
|
78 |
c1 = command
|
79 |
c2 = ""
|
80 |
function_map = {
|
81 |
-
"/init": init
|
82 |
-
"/pull": ollama.pull(c2),
|
83 |
-
"/list": ollama.list
|
84 |
-
"/bye": terminate
|
85 |
}
|
86 |
if c1 in function_map:
|
87 |
-
function_map.get(c1)
|
88 |
return "Running..."
|
89 |
else:
|
90 |
return "No supported command."
|
|
|
78 |
c1 = command
|
79 |
c2 = ""
|
80 |
function_map = {
|
81 |
+
"/init": init,
|
82 |
+
"/pull": lambda: ollama.pull(c2),
|
83 |
+
"/list": ollama.list,
|
84 |
+
"/bye": terminate,
|
85 |
}
|
86 |
if c1 in function_map:
|
87 |
+
function_map.get(c1)()
|
88 |
return "Running..."
|
89 |
else:
|
90 |
return "No supported command."
|