Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
fix request
Browse files- app_allenai.py +3 -1
app_allenai.py
CHANGED
@@ -21,7 +21,7 @@ def create_chat_fn(client):
|
|
21 |
return response
|
22 |
return chat
|
23 |
|
24 |
-
def set_client_for_session(model_name, request
|
25 |
headers = {}
|
26 |
if request and hasattr(request, 'request') and hasattr(request.request, 'headers'):
|
27 |
x_ip_token = request.request.headers.get('x-ip-token')
|
@@ -70,5 +70,7 @@ with gr.Blocks() as demo:
|
|
70 |
|
71 |
demo = demo
|
72 |
|
|
|
|
|
73 |
|
74 |
|
|
|
21 |
return response
|
22 |
return chat
|
23 |
|
24 |
+
def set_client_for_session(model_name, request: gr.Request):
|
25 |
headers = {}
|
26 |
if request and hasattr(request, 'request') and hasattr(request.request, 'headers'):
|
27 |
x_ip_token = request.request.headers.get('x-ip-token')
|
|
|
70 |
|
71 |
demo = demo
|
72 |
|
73 |
+
demo.launch()
|
74 |
+
|
75 |
|
76 |
|