Spaces:
Sleeping
Sleeping
File size: 2,506 Bytes
3663121 3810c45 14d4a0b 5ebeb73 7263d32 d76b5dc cddaa83 5ebeb73 3810c45 14d4a0b b76cf08 cddaa83 14d4a0b 90192b2 451f882 14d4a0b 5ebeb73 cddaa83 7591909 cddaa83 7591909 cddaa83 264a866 cddaa83 5ebeb73 089249c 5ebeb73 ba4de4a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
import os
import uuid
import gradio as gr
from helper.gradio_config import css, theme
from helper.text.text_app import TextApp
# from helper.utils import TrafficDataHandler
# from tabs.htr_tool import htr_tool_tab
# from tabs.overview_tab import overview
# from tabs.stepwise_htr_tool import stepwise_htr_tool_tab
session_uuid = str(uuid.uuid1())
with gr.Blocks(title="Riksarkivet", theme=theme, css=css) as demo:
gr.Markdown("<h1 style='color: red;'> π¨ The HTRFlow Demo is currently not available π¨ </h1>")
with gr.Row():
with gr.Column(scale=1):
text_ip_output = gr.Markdown(TextApp.demo_version)
with gr.Column(scale=2):
gr.Markdown(TextApp.title_markdown)
with gr.Column(scale=1):
gr.Markdown(TextApp.title_markdown_img)
with gr.Tabs():
with gr.Tab("HTRflow"):
gr.Markdown("")
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>")
gr.Markdown("In the meantime, see the [HTRflow π](https://ai-riksarkivet.github.io/htrflow/latest/)")
# with gr.Tab("Overview"):
# overview.render()
# with gr.Tab("Fast track", interactive=False):
# htr_tool_tab.render()
# with gr.Tab("Stepwise", interactive=False):
# stepwise_htr_tool_tab.render()
# with gr.Tab("How to use"):
# with gr.Row():
# with gr.Column():
# gr.Markdown("## Fast track")
# gr.Video(
# value="https://github.com/Borg93/htr_gradio_file_placeholder/raw/main/fast_track_record1.mp4",
# format="mp4",
# )
# with gr.Column():
# gr.Markdown("## Stepwise")
# gr.Video(
# "https://github.com/Borg93/htr_gradio_file_placeholder/raw/main/stepwise_track_record1.mp4",
# format="mp4",
# )
# SECRET_KEY = os.environ.get("HUB_TOKEN", False)
# if SECRET_KEY:
# demo.load(
# fn=TrafficDataHandler.onload_store_metric_data,
# inputs=None,
# outputs=None,
# )
demo.queue(concurrency_count=2, max_size=2)
if __name__ == "__main__":
demo.launch(server_name="0.0.0.0", server_port=7860, show_api=False, show_error=False)
|