Spaces:
Runtime error
Runtime error
ffreemt
commited on
Commit
·
d3d0893
1
Parent(s):
0e7c90d
Update block.load to update block.run_forever does not work
Browse files
app.py
CHANGED
|
@@ -24,6 +24,7 @@ ns = SimpleNamespace(response="")
|
|
| 24 |
def predict0(prompt, bot):
|
| 25 |
# logger.debug(f"{prompt=}, {bot=}, {timeout=}")
|
| 26 |
logger.debug(f"{prompt=}, {bot=}")
|
|
|
|
| 27 |
try:
|
| 28 |
user_prompt = prompt
|
| 29 |
generator = generate(llm, generation_config, system_prompt, user_prompt.strip())
|
|
@@ -438,7 +439,9 @@ with gr.Blocks(
|
|
| 438 |
)
|
| 439 |
|
| 440 |
# update buff Textbox, every: units in seconds)
|
| 441 |
-
|
|
|
|
|
|
|
| 442 |
|
| 443 |
# concurrency_count=5, max_size=20
|
| 444 |
# max_size=36, concurrency_count=14
|
|
|
|
| 24 |
def predict0(prompt, bot):
|
| 25 |
# logger.debug(f"{prompt=}, {bot=}, {timeout=}")
|
| 26 |
logger.debug(f"{prompt=}, {bot=}")
|
| 27 |
+
ns.response = ""
|
| 28 |
try:
|
| 29 |
user_prompt = prompt
|
| 30 |
generator = generate(llm, generation_config, system_prompt, user_prompt.strip())
|
|
|
|
| 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)
|
| 445 |
|
| 446 |
# concurrency_count=5, max_size=20
|
| 447 |
# max_size=36, concurrency_count=14
|