Spaces:
Runtime error
Runtime error
Francisco Aranda
commited on
Commit
•
b0bc07c
1
Parent(s):
f40fa43
chore: Add some docs
Browse files
README.md
CHANGED
@@ -13,6 +13,18 @@ pinned: false
|
|
13 |
|
14 |
This space is a basic server webhooks example to show how to set up webhook listeners using the argilla SDK.
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
## Running the app
|
18 |
|
|
|
13 |
|
14 |
This space is a basic server webhooks example to show how to set up webhook listeners using the argilla SDK.
|
15 |
|
16 |
+
The application defines three webhook listeners for the following events:
|
17 |
+
|
18 |
+
- Record events: `record.created`, `record.updated`, `record.deleted`, `record.completed`
|
19 |
+
- Dataset events: `dataset.created`, `dataset.updated`, `dataset.deleted`, `dataset.published`
|
20 |
+
- Response events: `response.created`, `response.updated`
|
21 |
+
|
22 |
+
The events are stored in a queue and displayed in the JSON component and the incoming events is updated every second.
|
23 |
+
|
24 |
+
You can view the incoming events in the JSON component below.
|
25 |
+
|
26 |
+
This application is just a demonstration of how to use the Argilla webhook listeners. You can visit the
|
27 |
+
[Argilla documentation](https://docs.argilla.io/dev/how_to_guides/webhooks) for more information.
|
28 |
|
29 |
## Running the app
|
30 |
|
app.py
CHANGED
@@ -51,7 +51,22 @@ def read_next_event():
|
|
51 |
with gr.Blocks() as demo:
|
52 |
argilla_server = client.http_client.base_url
|
53 |
gr.Markdown("## Argilla Events")
|
54 |
-
gr.Markdown(f"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
json_component = gr.JSON(label="Incoming argilla events:", value={})
|
56 |
gr.Timer(1, active=True).tick(read_next_event, outputs=json_component)
|
57 |
|
|
|
51 |
with gr.Blocks() as demo:
|
52 |
argilla_server = client.http_client.base_url
|
53 |
gr.Markdown("## Argilla Events")
|
54 |
+
gr.Markdown(f"""
|
55 |
+
This demo shows the incoming events from the [Argilla Server]({argilla_server}).
|
56 |
+
|
57 |
+
The application defines three webhook listeners for the following events:
|
58 |
+
- Record events: `record.created`, `record.updated`, `record.deleted`, `record.completed`
|
59 |
+
- Dataset events: `dataset.created`, `dataset.updated`, `dataset.deleted`, `dataset.published`
|
60 |
+
- Response events: `response.created`, `response.updated`
|
61 |
+
|
62 |
+
The events are stored in a queue and displayed in the JSON component and the incoming events is updated every second.
|
63 |
+
|
64 |
+
You can view the incoming events in the JSON component below.
|
65 |
+
|
66 |
+
This application is just a demonstration of how to use the Argilla webhook listeners.
|
67 |
+
|
68 |
+
You can visit the [Argilla documentation](https://docs.argilla.io/dev/how_to_guides/webhooks) for more information.
|
69 |
+
""")
|
70 |
json_component = gr.JSON(label="Incoming argilla events:", value={})
|
71 |
gr.Timer(1, active=True).tick(read_next_event, outputs=json_component)
|
72 |
|