Spaces:
Running
on
Zero
Running
on
Zero
dfa
Browse files- mysite/gradio/chat.py +1 -1
- mysite/libs/utilities.py +3 -0
mysite/gradio/chat.py
CHANGED
@@ -71,7 +71,7 @@ css = """
|
|
71 |
overflow-y: auto; /* 縦スクロールを有効にする */
|
72 |
}
|
73 |
"""
|
74 |
-
|
75 |
# Gradio block
|
76 |
chatbot2 = gr.Chatbot(height=450, placeholder=PLACEHOLDER, label="Gradio ChatInterface")
|
77 |
|
|
|
71 |
overflow-y: auto; /* 縦スクロールを有効にする */
|
72 |
}
|
73 |
"""
|
74 |
+
GENERATION_TIMEOUT_SEC = 60
|
75 |
# Gradio block
|
76 |
chatbot2 = gr.Chatbot(height=450, placeholder=PLACEHOLDER, label="Gradio ChatInterface")
|
77 |
|
mysite/libs/utilities.py
CHANGED
@@ -6,9 +6,12 @@ import base64
|
|
6 |
import subprocess
|
7 |
import time
|
8 |
from mysite.libs.logger import logger
|
|
|
|
|
9 |
|
10 |
|
11 |
|
|
|
12 |
|
13 |
def validate_signature(body: str, signature: str, secret: str) -> bool:
|
14 |
if secret is None:
|
|
|
6 |
import subprocess
|
7 |
import time
|
8 |
from mysite.libs.logger import logger
|
9 |
+
import async_timeout
|
10 |
+
import asyncio
|
11 |
|
12 |
|
13 |
|
14 |
+
GENERATION_TIMEOUT_SEC=60
|
15 |
|
16 |
def validate_signature(body: str, signature: str, secret: str) -> bool:
|
17 |
if secret is None:
|