chrisjay commited on
Commit
ee1d26b
β€’
1 Parent(s): f45345f

set cache to false for examples

Browse files
Files changed (2) hide show
  1. app.py +1 -3
  2. model.py +1 -1
app.py CHANGED
@@ -18,8 +18,6 @@ This Space demonstrates the dialogue models for Nigerian Pidgin, an African lang
18
  πŸ”Ž For more about visit [our homepage](https://www.masakhane.io/).
19
 
20
  """
21
- #πŸ”¨ Looking for an even more powerful model? Check out the large [**70B** model demo](https://huggingface.co/spaces/ysharma/Explore_llamav2_with_TGI).
22
- #πŸ‡ For a smaller model that you can run on many GPUs, check our [7B model demo](https://huggingface.co/spaces/huggingface-projects/llama-2-7b-chat).
23
 
24
 
25
  if not torch.cuda.is_available():
@@ -149,7 +147,7 @@ with gr.Blocks(css='style.css') as demo:
149
  inputs=textbox,
150
  outputs=[textbox, chatbot],
151
  fn=process_example,
152
- cache_examples=True,
153
  )
154
 
155
  #gr.Markdown(LICENSE)
 
18
  πŸ”Ž For more about visit [our homepage](https://www.masakhane.io/).
19
 
20
  """
 
 
21
 
22
 
23
  if not torch.cuda.is_available():
 
147
  inputs=textbox,
148
  outputs=[textbox, chatbot],
149
  fn=process_example,
150
+ cache_examples=False,
151
  )
152
 
153
  #gr.Markdown(LICENSE)
model.py CHANGED
@@ -55,7 +55,7 @@ def run(message: str,
55
  inputs = tokenizer([prompt], return_tensors='pt', add_special_tokens=False)
56
 
57
  streamer = TextIteratorStreamer(tokenizer,
58
- timeout=60.,
59
  skip_prompt=True,
60
  skip_special_tokens=True)
61
  generate_kwargs = dict(
 
55
  inputs = tokenizer([prompt], return_tensors='pt', add_special_tokens=False)
56
 
57
  streamer = TextIteratorStreamer(tokenizer,
58
+ timeout=60,
59
  skip_prompt=True,
60
  skip_special_tokens=True)
61
  generate_kwargs = dict(