ffreemt commited on
Commit
1058c80
1 Parent(s): b590c0b
Files changed (2) hide show
  1. README.md +1 -0
  2. app.py +3 -1
README.md CHANGED
@@ -8,5 +8,6 @@ sdk_version: 3.35.2
8
  app_file: app.py
9
  pinned: false
10
  ---
 
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
8
  app_file: app.py
9
  pinned: false
10
  ---
11
+ NB: Need a CPU Upgrade (32GB RAM) instance to run on a huggingface space
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -26,10 +26,12 @@ def predict0(prompt, bot):
26
  user_prompt = prompt
27
  generator = generate(llm, generation_config, system_prompt, user_prompt.strip())
28
  print(assistant_prefix, end=" ", flush=True)
 
 
29
  for word in generator:
30
  print(word, end="", flush=True)
31
  print("")
32
- response = word
33
  logger.debug(f"{response=}")
34
  except Exception as exc:
35
  logger.error(exc)
 
26
  user_prompt = prompt
27
  generator = generate(llm, generation_config, system_prompt, user_prompt.strip())
28
  print(assistant_prefix, end=" ", flush=True)
29
+
30
+ response = ""
31
  for word in generator:
32
  print(word, end="", flush=True)
33
  print("")
34
+ response += word
35
  logger.debug(f"{response=}")
36
  except Exception as exc:
37
  logger.error(exc)