Spaces:
Configuration error
Configuration error
Chenglu-She
commited on
Commit
•
8d3b1ad
1
Parent(s):
5e8a5db
Upload folder using huggingface_hub
Browse files- README.md +5 -5
- requirements.txt +1 -1
- space.py +6 -5
- src/README.md +6 -5
- src/demo/space.py +6 -5
- src/pyproject.toml +9 -5
README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
|
2 |
---
|
3 |
-
tags: [gradio-custom-component,gradio-template-SimpleTextbox]
|
4 |
-
title: gradio_log V0.0.
|
5 |
-
colorFrom:
|
6 |
-
colorTo:
|
7 |
sdk: docker
|
8 |
pinned: false
|
9 |
license: apache-2.0
|
@@ -12,6 +12,6 @@ license: apache-2.0
|
|
12 |
|
13 |
# Name: gradio_log
|
14 |
|
15 |
-
Description:
|
16 |
|
17 |
Install with: pip install gradio_log
|
|
|
1 |
|
2 |
---
|
3 |
+
tags: [gradio-custom-component,gradio-template-SimpleTextbox,log,gradio_log,gradio_log_component,gradio_print_log]
|
4 |
+
title: gradio_log V0.0.2
|
5 |
+
colorFrom: red
|
6 |
+
colorTo: green
|
7 |
sdk: docker
|
8 |
pinned: false
|
9 |
license: apache-2.0
|
|
|
12 |
|
13 |
# Name: gradio_log
|
14 |
|
15 |
+
Description: A Log component for Gradio which can easily show some log file in the interface.
|
16 |
|
17 |
Install with: pip install gradio_log
|
requirements.txt
CHANGED
@@ -1 +1 @@
|
|
1 |
-
gradio_log==0.0.
|
|
|
1 |
+
gradio_log==0.0.2
|
space.py
CHANGED
@@ -21,10 +21,10 @@ with gr.Blocks(
|
|
21 |
# `gradio_log`
|
22 |
|
23 |
<div style="display: flex; gap: 7px;">
|
24 |
-
<img alt="
|
25 |
</div>
|
26 |
|
27 |
-
|
28 |
""", elem_classes=["md-custom"], header_links=True)
|
29 |
app.render()
|
30 |
gr.Markdown(
|
@@ -40,9 +40,10 @@ pip install gradio_log
|
|
40 |
```python
|
41 |
import gradio as gr
|
42 |
from gradio_log import Log
|
|
|
43 |
|
44 |
|
45 |
-
with open("
|
46 |
# write some random log to f, with colored and uncolored text
|
47 |
f.write(b"[INFO] Everything is fine.\n")
|
48 |
f.write(b"\x1b[34m[DEBUG] Debugging information.\x1b[0m\n")
|
@@ -54,10 +55,10 @@ with open("/tmp/test.log", "wb") as f:
|
|
54 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
55 |
with gr.Row():
|
56 |
with gr.Column(scale=1):
|
57 |
-
Log("
|
58 |
with gr.Column(scale=1):
|
59 |
Log(
|
60 |
-
"
|
61 |
dark=True,
|
62 |
tail=4,
|
63 |
label="dark mode, read from last 4 lines of log",
|
|
|
21 |
# `gradio_log`
|
22 |
|
23 |
<div style="display: flex; gap: 7px;">
|
24 |
+
<a href="https://pypi.org/project/gradio_log/" target="_blank"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/gradio_log"></a>
|
25 |
</div>
|
26 |
|
27 |
+
A Log component for Gradio which can easily show some log file in the interface.
|
28 |
""", elem_classes=["md-custom"], header_links=True)
|
29 |
app.render()
|
30 |
gr.Markdown(
|
|
|
40 |
```python
|
41 |
import gradio as gr
|
42 |
from gradio_log import Log
|
43 |
+
import os
|
44 |
|
45 |
|
46 |
+
with open("./test.log", "wb") as f:
|
47 |
# write some random log to f, with colored and uncolored text
|
48 |
f.write(b"[INFO] Everything is fine.\n")
|
49 |
f.write(b"\x1b[34m[DEBUG] Debugging information.\x1b[0m\n")
|
|
|
55 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
56 |
with gr.Row():
|
57 |
with gr.Column(scale=1):
|
58 |
+
Log("./test.log")
|
59 |
with gr.Column(scale=1):
|
60 |
Log(
|
61 |
+
"./test.log",
|
62 |
dark=True,
|
63 |
tail=4,
|
64 |
label="dark mode, read from last 4 lines of log",
|
src/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
|
2 |
# `gradio_log`
|
3 |
-
<img alt="
|
4 |
|
5 |
-
|
6 |
|
7 |
## Installation
|
8 |
|
@@ -15,9 +15,10 @@ pip install gradio_log
|
|
15 |
```python
|
16 |
import gradio as gr
|
17 |
from gradio_log import Log
|
|
|
18 |
|
19 |
|
20 |
-
with open("
|
21 |
# write some random log to f, with colored and uncolored text
|
22 |
f.write(b"[INFO] Everything is fine.\n")
|
23 |
f.write(b"\x1b[34m[DEBUG] Debugging information.\x1b[0m\n")
|
@@ -29,10 +30,10 @@ with open("/tmp/test.log", "wb") as f:
|
|
29 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
30 |
with gr.Row():
|
31 |
with gr.Column(scale=1):
|
32 |
-
Log("
|
33 |
with gr.Column(scale=1):
|
34 |
Log(
|
35 |
-
"
|
36 |
dark=True,
|
37 |
tail=4,
|
38 |
label="dark mode, read from last 4 lines of log",
|
|
|
1 |
|
2 |
# `gradio_log`
|
3 |
+
<a href="https://pypi.org/project/gradio_log/" target="_blank"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/gradio_log"></a>
|
4 |
|
5 |
+
A Log component for Gradio which can easily show some log file in the interface.
|
6 |
|
7 |
## Installation
|
8 |
|
|
|
15 |
```python
|
16 |
import gradio as gr
|
17 |
from gradio_log import Log
|
18 |
+
import os
|
19 |
|
20 |
|
21 |
+
with open("./test.log", "wb") as f:
|
22 |
# write some random log to f, with colored and uncolored text
|
23 |
f.write(b"[INFO] Everything is fine.\n")
|
24 |
f.write(b"\x1b[34m[DEBUG] Debugging information.\x1b[0m\n")
|
|
|
30 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
31 |
with gr.Row():
|
32 |
with gr.Column(scale=1):
|
33 |
+
Log("./test.log")
|
34 |
with gr.Column(scale=1):
|
35 |
Log(
|
36 |
+
"./test.log",
|
37 |
dark=True,
|
38 |
tail=4,
|
39 |
label="dark mode, read from last 4 lines of log",
|
src/demo/space.py
CHANGED
@@ -21,10 +21,10 @@ with gr.Blocks(
|
|
21 |
# `gradio_log`
|
22 |
|
23 |
<div style="display: flex; gap: 7px;">
|
24 |
-
<img alt="
|
25 |
</div>
|
26 |
|
27 |
-
|
28 |
""", elem_classes=["md-custom"], header_links=True)
|
29 |
app.render()
|
30 |
gr.Markdown(
|
@@ -40,9 +40,10 @@ pip install gradio_log
|
|
40 |
```python
|
41 |
import gradio as gr
|
42 |
from gradio_log import Log
|
|
|
43 |
|
44 |
|
45 |
-
with open("
|
46 |
# write some random log to f, with colored and uncolored text
|
47 |
f.write(b"[INFO] Everything is fine.\n")
|
48 |
f.write(b"\x1b[34m[DEBUG] Debugging information.\x1b[0m\n")
|
@@ -54,10 +55,10 @@ with open("/tmp/test.log", "wb") as f:
|
|
54 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
55 |
with gr.Row():
|
56 |
with gr.Column(scale=1):
|
57 |
-
Log("
|
58 |
with gr.Column(scale=1):
|
59 |
Log(
|
60 |
-
"
|
61 |
dark=True,
|
62 |
tail=4,
|
63 |
label="dark mode, read from last 4 lines of log",
|
|
|
21 |
# `gradio_log`
|
22 |
|
23 |
<div style="display: flex; gap: 7px;">
|
24 |
+
<a href="https://pypi.org/project/gradio_log/" target="_blank"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/gradio_log"></a>
|
25 |
</div>
|
26 |
|
27 |
+
A Log component for Gradio which can easily show some log file in the interface.
|
28 |
""", elem_classes=["md-custom"], header_links=True)
|
29 |
app.render()
|
30 |
gr.Markdown(
|
|
|
40 |
```python
|
41 |
import gradio as gr
|
42 |
from gradio_log import Log
|
43 |
+
import os
|
44 |
|
45 |
|
46 |
+
with open("./test.log", "wb") as f:
|
47 |
# write some random log to f, with colored and uncolored text
|
48 |
f.write(b"[INFO] Everything is fine.\n")
|
49 |
f.write(b"\x1b[34m[DEBUG] Debugging information.\x1b[0m\n")
|
|
|
55 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
56 |
with gr.Row():
|
57 |
with gr.Column(scale=1):
|
58 |
+
Log("./test.log")
|
59 |
with gr.Column(scale=1):
|
60 |
Log(
|
61 |
+
"./test.log",
|
62 |
dark=True,
|
63 |
tail=4,
|
64 |
label="dark mode, read from last 4 lines of log",
|
src/pyproject.toml
CHANGED
@@ -8,15 +8,19 @@ build-backend = "hatchling.build"
|
|
8 |
|
9 |
[project]
|
10 |
name = "gradio_log"
|
11 |
-
version = "0.0.
|
12 |
-
description = "
|
13 |
readme = "README.md"
|
14 |
license = "Apache-2.0"
|
15 |
requires-python = ">=3.8"
|
16 |
-
authors = [{ name = "
|
17 |
keywords = [
|
18 |
"gradio-custom-component",
|
19 |
-
"gradio-template-SimpleTextbox"
|
|
|
|
|
|
|
|
|
20 |
]
|
21 |
# Add dependencies here
|
22 |
dependencies = ["gradio>=4.0,<5.0"]
|
@@ -39,7 +43,7 @@ classifiers = [
|
|
39 |
dev = ["build", "twine"]
|
40 |
|
41 |
[tool.hatch.build]
|
42 |
-
artifacts = ["/backend/gradio_log/templates", "*.pyi", "backend/gradio_log/templates", "backend/gradio_log/templates"]
|
43 |
|
44 |
[tool.hatch.build.targets.wheel]
|
45 |
packages = ["/backend/gradio_log"]
|
|
|
8 |
|
9 |
[project]
|
10 |
name = "gradio_log"
|
11 |
+
version = "0.0.2"
|
12 |
+
description = "A Log component for Gradio which can easily show some log file in the interface."
|
13 |
readme = "README.md"
|
14 |
license = "Apache-2.0"
|
15 |
requires-python = ">=3.8"
|
16 |
+
authors = [{ name = "Chenglu", email = "chenglu.she@gmail.com" }]
|
17 |
keywords = [
|
18 |
"gradio-custom-component",
|
19 |
+
"gradio-template-SimpleTextbox",
|
20 |
+
"log",
|
21 |
+
"gradio_log",
|
22 |
+
"gradio_log_component",
|
23 |
+
"gradio_print_log",
|
24 |
]
|
25 |
# Add dependencies here
|
26 |
dependencies = ["gradio>=4.0,<5.0"]
|
|
|
43 |
dev = ["build", "twine"]
|
44 |
|
45 |
[tool.hatch.build]
|
46 |
+
artifacts = ["/backend/gradio_log/templates", "*.pyi", "backend/gradio_log/templates", "backend/gradio_log/templates", "backend/gradio_log/templates"]
|
47 |
|
48 |
[tool.hatch.build.targets.wheel]
|
49 |
packages = ["/backend/gradio_log"]
|