Gabriel commited on
Commit
cddaa83
·
verified ·
1 Parent(s): 264a866

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -37
app.py CHANGED
@@ -5,15 +5,15 @@ import gradio as gr
5
 
6
  from helper.gradio_config import css, theme
7
  from helper.text.text_app import TextApp
8
- from helper.utils import TrafficDataHandler
9
- from tabs.htr_tool import htr_tool_tab
10
- from tabs.overview_tab import overview
11
- from tabs.stepwise_htr_tool import stepwise_htr_tool_tab
12
 
13
  session_uuid = str(uuid.uuid1())
14
 
15
  with gr.Blocks(title="Riksarkivet", theme=theme, css=css) as demo:
16
- gr.Markdown("<h1 style='color: red;'> 🚨 The HTRFlow Demo is currently not available. We plan to re-launch an updated version in February 2025 🚨 </h1>")
17
  with gr.Row():
18
  with gr.Column(scale=1):
19
  text_ip_output = gr.Markdown(TextApp.demo_version)
@@ -23,39 +23,45 @@ with gr.Blocks(title="Riksarkivet", theme=theme, css=css) as demo:
23
  gr.Markdown(TextApp.title_markdown_img)
24
 
25
  with gr.Tabs():
26
- with gr.Tab("Overview"):
27
- overview.render()
 
 
 
 
 
 
28
 
29
- with gr.Tab("Fast track", interactive=False):
30
- htr_tool_tab.render()
31
-
32
- with gr.Tab("Stepwise", interactive=False):
33
- stepwise_htr_tool_tab.render()
34
-
35
-
36
-
37
- with gr.Tab("How to use"):
38
- with gr.Row():
39
- with gr.Column():
40
- gr.Markdown("## Fast track")
41
- gr.Video(
42
- value="https://github.com/Borg93/htr_gradio_file_placeholder/raw/main/fast_track_record1.mp4",
43
- format="mp4",
44
- )
45
- with gr.Column():
46
- gr.Markdown("## Stepwise")
47
- gr.Video(
48
- "https://github.com/Borg93/htr_gradio_file_placeholder/raw/main/stepwise_track_record1.mp4",
49
- format="mp4",
50
- )
51
-
52
- SECRET_KEY = os.environ.get("HUB_TOKEN", False)
53
- if SECRET_KEY:
54
- demo.load(
55
- fn=TrafficDataHandler.onload_store_metric_data,
56
- inputs=None,
57
- outputs=None,
58
- )
59
 
60
 
61
  demo.queue(concurrency_count=2, max_size=2)
 
5
 
6
  from helper.gradio_config import css, theme
7
  from helper.text.text_app import TextApp
8
+ # from helper.utils import TrafficDataHandler
9
+ # from tabs.htr_tool import htr_tool_tab
10
+ # from tabs.overview_tab import overview
11
+ # from tabs.stepwise_htr_tool import stepwise_htr_tool_tab
12
 
13
  session_uuid = str(uuid.uuid1())
14
 
15
  with gr.Blocks(title="Riksarkivet", theme=theme, css=css) as demo:
16
+ gr.Markdown("<h1 style='color: red;'> 🚨 The HTRFlow Demo is currently not available 🚨 </h1>")
17
  with gr.Row():
18
  with gr.Column(scale=1):
19
  text_ip_output = gr.Markdown(TextApp.demo_version)
 
23
  gr.Markdown(TextApp.title_markdown_img)
24
 
25
  with gr.Tabs():
26
+
27
+ with gr.Tab("HTRflow"):
28
+ gr.Markdown("")
29
+ gr.Markdown("<h1 style='color: red;'> 🚨 The HTRFlow Demo is currently not available. We plan to re-launch an updated version in February 2025 🚨 </h1>")
30
+
31
+ gr.Markdown("In the meantime, see the [HTRflow docs](https://ai-riksarkivet.github.io/htrflow/latest/)")
32
+ # with gr.Tab("Overview"):
33
+ # overview.render()
34
 
35
+ # with gr.Tab("Fast track", interactive=False):
36
+ # htr_tool_tab.render()
37
+
38
+ # with gr.Tab("Stepwise", interactive=False):
39
+ # stepwise_htr_tool_tab.render()
40
+
41
+
42
+
43
+ # with gr.Tab("How to use"):
44
+ # with gr.Row():
45
+ # with gr.Column():
46
+ # gr.Markdown("## Fast track")
47
+ # gr.Video(
48
+ # value="https://github.com/Borg93/htr_gradio_file_placeholder/raw/main/fast_track_record1.mp4",
49
+ # format="mp4",
50
+ # )
51
+ # with gr.Column():
52
+ # gr.Markdown("## Stepwise")
53
+ # gr.Video(
54
+ # "https://github.com/Borg93/htr_gradio_file_placeholder/raw/main/stepwise_track_record1.mp4",
55
+ # format="mp4",
56
+ # )
57
+
58
+ # SECRET_KEY = os.environ.get("HUB_TOKEN", False)
59
+ # if SECRET_KEY:
60
+ # demo.load(
61
+ # fn=TrafficDataHandler.onload_store_metric_data,
62
+ # inputs=None,
63
+ # outputs=None,
64
+ # )
65
 
66
 
67
  demo.queue(concurrency_count=2, max_size=2)