Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,13 +3,33 @@ import gradio as gr
|
|
| 3 |
with gr.Blocks() as demo:
|
| 4 |
gr.Markdown(
|
| 5 |
value="""
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
```python
|
| 8 |
-
|
| 9 |
-
|
| 10 |
```
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
demo.launch()
|
|
|
|
| 3 |
with gr.Blocks() as demo:
|
| 4 |
gr.Markdown(
|
| 5 |
value="""
|
| 6 |
+
## Start logging with Trackio 🤗
|
| 7 |
+
|
| 8 |
+
To start logging to this Trackio dashboard, first make sure you have the Trackio library installed. You can do this by running:
|
| 9 |
+
|
| 10 |
+
```bash
|
| 11 |
+
pip install trackio
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
Then, start logging to this Trackio dashboard by passing in the `space_id` to `trackio.init()`:
|
| 15 |
+
|
| 16 |
+
```python
|
| 17 |
+
import trackio
|
| 18 |
+
trackio.init(project="my-project", space_id="{}")
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
Then call `trackio.log()` to log metrics.
|
| 22 |
+
|
| 23 |
```python
|
| 24 |
+
for i in range(10):
|
| 25 |
+
trackio.log({{"loss": 1/(i+1)}})
|
| 26 |
```
|
| 27 |
|
| 28 |
+
Finally, call `trackio.finish()` to finish the run.
|
| 29 |
+
|
| 30 |
+
```python
|
| 31 |
+
trackio.finish()
|
| 32 |
+
```
|
| 33 |
+
""" )
|
| 34 |
|
| 35 |
+
demo.launch()
|