ffreemt commited on
Commit
21d3b25
1 Parent(s): d3d0893

Update buff.update(value=response)

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -35,6 +35,7 @@ def predict0(prompt, bot):
35
  print(word, end="", flush=True)
36
  response += word
37
  ns.response = response
 
38
  print("")
39
  logger.debug(f"{response=}")
40
  except Exception as exc:
@@ -439,6 +440,7 @@ with gr.Blocks(
439
  )
440
 
441
  # update buff Textbox, every: units in seconds)
 
442
  # does not work
443
  # AttributeError: 'Blocks' object has no attribute 'run_forever'
444
  # block.run_forever(lambda: ns.response, None, [buff], every=1)
 
35
  print(word, end="", flush=True)
36
  response += word
37
  ns.response = response
38
+ buff.update(value=response)
39
  print("")
40
  logger.debug(f"{response=}")
41
  except Exception as exc:
 
440
  )
441
 
442
  # update buff Textbox, every: units in seconds)
443
+ # https://huggingface.co/spaces/julien-c/nvidia-smi/discussions
444
  # does not work
445
  # AttributeError: 'Blocks' object has no attribute 'run_forever'
446
  # block.run_forever(lambda: ns.response, None, [buff], every=1)