vilarin commited on
Commit
0e2883b
·
verified ·
1 Parent(s): 398b913

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -83,10 +83,10 @@ def ollama_func(command):
83
  "/bye": terminate(),
84
  }
85
  if c1 in function_map:
86
- function_map[c1]
87
- return [f"Running {function_map[c1]}"]
88
  else:
89
- return ["No supported command."]
90
 
91
  @spaces.GPU()
92
  def launch():
@@ -95,12 +95,12 @@ def launch():
95
  time.sleep(10)
96
 
97
  def stream_chat(message: str, history: list, model: str, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
98
-
99
  if message.startswith("/"):
100
  ollama_func(message)
101
  else:
102
  if not INIT_SIGN:
103
- return ["Please Enter /init to initialize Ollama"]
104
  else:
105
  launch()
106
  conversation = []
 
83
  "/bye": terminate(),
84
  }
85
  if c1 in function_map:
86
+ function_map.get(c1)
87
+ return [[f"Running {c1}"]]
88
  else:
89
+ return [["No supported command."]]
90
 
91
  @spaces.GPU()
92
  def launch():
 
95
  time.sleep(10)
96
 
97
  def stream_chat(message: str, history: list, model: str, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
98
+ print(f"message: {message}")
99
  if message.startswith("/"):
100
  ollama_func(message)
101
  else:
102
  if not INIT_SIGN:
103
+ return [["Please Enter /init to initialize Ollama"]]
104
  else:
105
  launch()
106
  conversation = []