Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -58,12 +58,14 @@ def generate(
|
|
58 |
)
|
59 |
seed = seed + 1
|
60 |
formatted_prompt = format_prompt(prompt, history, system_prompt)
|
61 |
-
|
|
|
|
|
62 |
if not status.loaded:
|
63 |
-
|
64 |
|
65 |
try:
|
66 |
-
stream =
|
67 |
output = ""
|
68 |
|
69 |
for response in stream:
|
|
|
58 |
)
|
59 |
seed = seed + 1
|
60 |
formatted_prompt = format_prompt(prompt, history, system_prompt)
|
61 |
+
|
62 |
+
cli = client
|
63 |
+
status = cli.get_model_status()
|
64 |
if not status.loaded:
|
65 |
+
cli = client2
|
66 |
|
67 |
try:
|
68 |
+
stream = cli.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
69 |
output = ""
|
70 |
|
71 |
for response in stream:
|