Wauplin HF staff commited on
Commit
ccb4b5f
1 Parent(s): 3c28763
Files changed (1) hide show
  1. space.py +15 -2
space.py CHANGED
@@ -26,11 +26,11 @@ def random_values(failing: bool = False):
26
 
27
 
28
  def fn_process_success():
29
- yield from LogsView.run_process(["python", "-u", "demo/script.py"])
30
 
31
 
32
  def fn_process_failing():
33
- yield from LogsView.run_process(["python", "-u", "demo/script.py", "--failing"])
34
 
35
 
36
  def fn_thread_success():
@@ -53,6 +53,19 @@ In the process example, logs are generated by a Python script but any command ca
53
 
54
 
55
  markdown_bottom = """
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  ## How to run in a thread?
57
 
58
  With `LogsView.run_thread`, you can run a function in a separate thread and capture logs in real-time.
 
26
 
27
 
28
  def fn_process_success():
29
+ yield from LogsView.run_process(["python", "-u", "script.py"])
30
 
31
 
32
  def fn_process_failing():
33
+ yield from LogsView.run_process(["python", "-u", "script.py", "--failing"])
34
 
35
 
36
  def fn_thread_success():
 
53
 
54
 
55
  markdown_bottom = """
56
+ ## Installation
57
+
58
+ ```
59
+ pip install https://huggingface.co/spaces/Wauplin/gradio_logsview/resolve/main/gradio_logsview-0.0.1-py3-none-any.whl
60
+ ```
61
+
62
+ or add this line to your `requirements.txt`:
63
+
64
+ ```
65
+ gradio_logsview@https://huggingface.co/spaces/Wauplin/gradio_logsview/resolve/main/gradio_logsview-0.0.1-py3-none-any.whl
66
+ ```
67
+
68
+
69
  ## How to run in a thread?
70
 
71
  With `LogsView.run_thread`, you can run a function in a separate thread and capture logs in real-time.