Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,8 +46,9 @@ SPACE_REPO_ID = os.environ.get("SPACE_REPO_ID", "")
|
|
| 46 |
# Generation / toggles
|
| 47 |
ALLOW_WIKIPEDIA = False
|
| 48 |
DEBUG = True
|
| 49 |
-
MAX_NEW_TOKENS_GROUNDED = 512
|
| 50 |
-
MAX_NEW_TOKENS_FALLBACK = 256
|
|
|
|
| 51 |
MIN_USEFUL_CHARS = 260
|
| 52 |
|
| 53 |
def dlog(tag, msg):
|
|
@@ -970,17 +971,18 @@ with gr.Blocks(theme="soft") as demo:
|
|
| 970 |
)
|
| 971 |
|
| 972 |
send_btn.click(
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
| 976 |
-
|
| 977 |
)
|
| 978 |
|
|
|
|
| 979 |
user_in.submit(
|
| 980 |
-
|
| 981 |
-
|
| 982 |
-
|
| 983 |
-
|
| 984 |
)
|
| 985 |
|
| 986 |
clear_btn.click(
|
|
|
|
| 46 |
# Generation / toggles
|
| 47 |
ALLOW_WIKIPEDIA = False
|
| 48 |
DEBUG = True
|
| 49 |
+
MAX_NEW_TOKENS_GROUNDED = 384 # was 512
|
| 50 |
+
MAX_NEW_TOKENS_FALLBACK = 192 # was 256
|
| 51 |
+
|
| 52 |
MIN_USEFUL_CHARS = 260
|
| 53 |
|
| 54 |
def dlog(tag, msg):
|
|
|
|
| 971 |
)
|
| 972 |
|
| 973 |
send_btn.click(
|
| 974 |
+
predict,
|
| 975 |
+
inputs=[user_in, chat, state],
|
| 976 |
+
outputs=[chat, user_in, feedback_grp, rating, comment, state],
|
| 977 |
+
concurrency_limit=3,
|
| 978 |
)
|
| 979 |
|
| 980 |
+
|
| 981 |
user_in.submit(
|
| 982 |
+
predict,
|
| 983 |
+
inputs=[user_in, chat, state],
|
| 984 |
+
outputs=[chat, user_in, feedback_grp, rating, comment, state],
|
| 985 |
+
concurrency_limit=3,
|
| 986 |
)
|
| 987 |
|
| 988 |
clear_btn.click(
|