Spaces:
Running
Running
update name
Browse files- app_allenai.py +2 -2
app_allenai.py
CHANGED
|
@@ -35,7 +35,7 @@ def safe_chat_fn(message, history, client):
|
|
| 35 |
return "Error: Client not initialized. Please refresh the page."
|
| 36 |
return create_chat_fn(client)(message, history)
|
| 37 |
|
| 38 |
-
with gr.Blocks() as
|
| 39 |
|
| 40 |
client = gr.State()
|
| 41 |
|
|
@@ -62,7 +62,7 @@ with gr.Blocks() as interface:
|
|
| 62 |
)
|
| 63 |
|
| 64 |
# Initialize client on page load
|
| 65 |
-
|
| 66 |
fn=set_client_for_session,
|
| 67 |
inputs=gr.State("OLMo-2-1124-13B-Instruct"),
|
| 68 |
outputs=client,
|
|
|
|
| 35 |
return "Error: Client not initialized. Please refresh the page."
|
| 36 |
return create_chat_fn(client)(message, history)
|
| 37 |
|
| 38 |
+
with gr.Blocks() as demo:
|
| 39 |
|
| 40 |
client = gr.State()
|
| 41 |
|
|
|
|
| 62 |
)
|
| 63 |
|
| 64 |
# Initialize client on page load
|
| 65 |
+
demo.load(
|
| 66 |
fn=set_client_for_session,
|
| 67 |
inputs=gr.State("OLMo-2-1124-13B-Instruct"),
|
| 68 |
outputs=client,
|