Spaces:
Sleeping
Sleeping
apple muncy
commited on
Commit
·
e93a32a
1
Parent(s):
dc4639f
add payload_d display
Browse filesSigned-off-by: apple muncy <[email protected]>
app.py
CHANGED
@@ -398,6 +398,7 @@ Please process all {len(all_tags)} tags: {", ".join(all_tags)}
|
|
398 |
print(error_msg)
|
399 |
return error_msg
|
400 |
|
|
|
401 |
|
402 |
@my_app.post("/webhook")
|
403 |
async def webhook_handler(request: Request, background_tasks: BackgroundTasks):
|
@@ -409,7 +410,7 @@ async def webhook_handler(request: Request, background_tasks: BackgroundTasks):
|
|
409 |
|
410 |
payload = await request.json()
|
411 |
print(f"📥 Received webhook payload: {json.dumps(payload, indent=2)}")
|
412 |
-
|
413 |
event = payload.get("event", {})
|
414 |
scope = event.get("scope")
|
415 |
action = event.get("action")
|
@@ -545,7 +546,7 @@ def create_dashboard():
|
|
545 |
|
546 |
with gr.Column():
|
547 |
sim_repo = gr.Textbox(
|
548 |
-
label="
|
549 |
value="burtenshaw/play-mcp-repo-bot",
|
550 |
placeholder="username/model-name",
|
551 |
)
|
@@ -561,6 +562,12 @@ def create_dashboard():
|
|
561 |
placeholder="Comment mentioning tags...",
|
562 |
)
|
563 |
sim_btn = gr.Button("🏷️ Test Tag Detection")
|
|
|
|
|
|
|
|
|
|
|
|
|
564 |
return demo
|
565 |
|
566 |
|
|
|
398 |
print(error_msg)
|
399 |
return error_msg
|
400 |
|
401 |
+
payload_g=[]
|
402 |
|
403 |
@my_app.post("/webhook")
|
404 |
async def webhook_handler(request: Request, background_tasks: BackgroundTasks):
|
|
|
410 |
|
411 |
payload = await request.json()
|
412 |
print(f"📥 Received webhook payload: {json.dumps(payload, indent=2)}")
|
413 |
+
payload_g.append(payload)
|
414 |
event = payload.get("event", {})
|
415 |
scope = event.get("scope")
|
416 |
action = event.get("action")
|
|
|
546 |
|
547 |
with gr.Column():
|
548 |
sim_repo = gr.Textbox(
|
549 |
+
label="Payload",
|
550 |
value="burtenshaw/play-mcp-repo-bot",
|
551 |
placeholder="username/model-name",
|
552 |
)
|
|
|
562 |
placeholder="Comment mentioning tags...",
|
563 |
)
|
564 |
sim_btn = gr.Button("🏷️ Test Tag Detection")
|
565 |
+
gr.Markdown(f"""
|
566 |
+
## Recognized Tags:
|
567 |
+
{payload_g}
|
568 |
+
""")
|
569 |
+
|
570 |
+
|
571 |
return demo
|
572 |
|
573 |
|