Chenglu-She commited on
Commit
1a2f94a
1 Parent(s): 9812c2e

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +1 -1
  2. app.py +3 -2
  3. src/.gitignore +1 -2
  4. src/demo/app.py +3 -2
README.md CHANGED
@@ -3,7 +3,7 @@
3
  tags: [gradio-custom-component,gradio-template-SimpleTextbox]
4
  title: gradio_log V0.0.1
5
  colorFrom: blue
6
- colorTo: red
7
  sdk: docker
8
  pinned: false
9
  license: apache-2.0
 
3
  tags: [gradio-custom-component,gradio-template-SimpleTextbox]
4
  title: gradio_log V0.0.1
5
  colorFrom: blue
6
+ colorTo: gray
7
  sdk: docker
8
  pinned: false
9
  license: apache-2.0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  from gradio_log import Log
 
3
 
4
 
5
  with open("./test.log", "wb") as f:
@@ -14,10 +15,10 @@ with open("./test.log", "wb") as f:
14
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
15
  with gr.Row():
16
  with gr.Column(scale=1):
17
- Log("/tmp/test.log")
18
  with gr.Column(scale=1):
19
  Log(
20
- "/tmp/test.log",
21
  dark=True,
22
  tail=4,
23
  label="dark mode, read from last 4 lines of log",
 
1
  import gradio as gr
2
  from gradio_log import Log
3
+ import os
4
 
5
 
6
  with open("./test.log", "wb") as f:
 
15
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
16
  with gr.Row():
17
  with gr.Column(scale=1):
18
+ Log("./test.log")
19
  with gr.Column(scale=1):
20
  Log(
21
+ "./test.log",
22
  dark=True,
23
  tail=4,
24
  label="dark mode, read from last 4 lines of log",
src/.gitignore CHANGED
@@ -6,5 +6,4 @@ __pycache__/
6
  *$py.class
7
  __tmp/*
8
  *.pyi
9
- node_modules
10
- ./test.log
 
6
  *$py.class
7
  __tmp/*
8
  *.pyi
9
+ node_modules
 
src/demo/app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  from gradio_log import Log
 
3
 
4
 
5
  with open("./test.log", "wb") as f:
@@ -14,10 +15,10 @@ with open("./test.log", "wb") as f:
14
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
15
  with gr.Row():
16
  with gr.Column(scale=1):
17
- Log("/tmp/test.log")
18
  with gr.Column(scale=1):
19
  Log(
20
- "/tmp/test.log",
21
  dark=True,
22
  tail=4,
23
  label="dark mode, read from last 4 lines of log",
 
1
  import gradio as gr
2
  from gradio_log import Log
3
+ import os
4
 
5
 
6
  with open("./test.log", "wb") as f:
 
15
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
16
  with gr.Row():
17
  with gr.Column(scale=1):
18
+ Log("./test.log")
19
  with gr.Column(scale=1):
20
  Log(
21
+ "./test.log",
22
  dark=True,
23
  tail=4,
24
  label="dark mode, read from last 4 lines of log",