Spaces:
Sleeping
Sleeping
Commit ·
4bfdc55
1
Parent(s): acbd024
add indent
Browse files
app.py
CHANGED
|
@@ -180,13 +180,13 @@ with gr.Blocks() as demo:
|
|
| 180 |
answer_box = gr.Textbox(lines=6, label="Assistant reply")
|
| 181 |
|
| 182 |
answer_btn.click(
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
)
|
| 190 |
|
| 191 |
# ---------- 3. FastAPI layer --------------------------------------------------
|
| 192 |
class IngestReq(BaseModel):
|
|
|
|
| 180 |
answer_box = gr.Textbox(lines=6, label="Assistant reply")
|
| 181 |
|
| 182 |
answer_btn.click(
|
| 183 |
+
fn=lambda sys, ctx, q, uid, h: answer(sys,
|
| 184 |
+
[line.strip() for line in ctx.splitlines() if line.strip()],
|
| 185 |
+
q, uid, h
|
| 186 |
+
),
|
| 187 |
+
inputs=[system_box, context_box, question_box, user_id_box, history_cb],
|
| 188 |
+
outputs=answer_box
|
| 189 |
+
)
|
| 190 |
|
| 191 |
# ---------- 3. FastAPI layer --------------------------------------------------
|
| 192 |
class IngestReq(BaseModel):
|