Ashwin V. Mohanan commited on
Commit
ddd87aa
·
1 Parent(s): d00dcd7

Add sidebar and Härnösand example

Browse files
app/content/main_sub_title.md CHANGED
@@ -1,3 +1,5 @@
1
  <a href="https://dawsonia.readthedocs.io">
2
- <img src="https://git.smhi.se/ai-for-obs/dawsonia/-/raw/main/docs/source/_static/smhi_logo_black_8mm.png" width="17%" align="right" margin-right="200" />
 
 
3
  </a>
 
1
  <a href="https://dawsonia.readthedocs.io">
2
+ <img src="https://git.smhi.se/ai-for-obs/dawsonia/-/raw/main/docs/source/_static/smhi_logo_black_8mm.png" width="17%"
3
+ align="right" margin-right="200" />
4
+ <img src="https://media.enccs.se/2022/12/ENCCS-Logo-Horizontal-Colour-low-res-323.png" width="17%" alt="">
5
  </a>
app/content/sidebar.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Dawsonia App
2
+
3
+ Welcome to the **Dawsonia App** – a demo web application developed by **SMHI**, in collaboration with [ENCCS](https://www.enccs.se/). [Dawsonia](https://dawsonia.readthedocs.io/en/latest) is a tool built for digitization of
4
+ handwritten observations in weather journals
5
+
6
+ ### How It Works
7
+
8
+ 1. **Upload:** Select from examples on the right or submit your own image file (WIP!) to run through Dawsonia.
9
+ 2. **Results:** View the digitized text generated by the system.
10
+ <!-- 3. **Export:** Choose your preferred format and download your results. -->
11
+
12
+ > Note: This demo application is for demonstration purposes only and is not intended for production use.
13
+
14
+ ### Get in touch
15
+
16
+ ✉️ If you are interested in contributing to the project, [follow this link](https://dawsonia.readthedocs.io/en/latest/contributing.html).
17
+
18
+ ### Projects
19
+
20
+ Both the App and Dawsonia's code are completely open source. Explore and contribute on GitHub:
21
+
22
+ - [App](https://huggingface.co/spaces/ai-for-obs/dawsonia-demo/tree/main).
23
+ - [Dawsonia](https://git.smhi.se/ai-for-obs/dawsonia/).
24
+
25
+ If you find our projects useful, please consider giving us a star ⭐!
app/main.py CHANGED
@@ -43,13 +43,11 @@ html_header = ""
43
 
44
 
45
  with gr.Blocks(title="Dawsonia Demo", theme=theme, css=css, head=html_header) as demo:
46
- with gr.Row():
47
- with gr.Column(scale=1):
48
- pass
49
- with gr.Column(scale=2):
50
- gr.Markdown(load_markdown(None, "main_title"))
51
- with gr.Column(scale=1):
52
- gr.Markdown(load_markdown(None, "main_sub_title"))
53
 
54
  with gr.Tabs(elem_classes="top-navbar") as navbar:
55
  with gr.Tab(label="Upload") as tab_submit:
 
43
 
44
 
45
  with gr.Blocks(title="Dawsonia Demo", theme=theme, css=css, head=html_header) as demo:
46
+ gr.Markdown(load_markdown(None, "main_title"))
47
+
48
+ with gr.Sidebar(label="Menu"):
49
+ gr.Markdown(load_markdown(None, "main_sub_title"))
50
+ gr.Markdown(load_markdown(None, "sidebar"))
 
 
51
 
52
  with gr.Tabs(elem_classes="top-navbar") as navbar:
53
  with gr.Tab(label="Upload") as tab_submit:
app/tabs/submit.py CHANGED
@@ -36,6 +36,10 @@ PIPELINES: dict[str, dict[str, str]] = {
36
  "bjuröklubb": dict(
37
  url="https://git.smhi.se/ai-for-obs/data/-/raw/688c04f13e8e946962792fe4b4e0ded98800b154/raw_zarr/BJUR%C3%96KLUBB/DAGBOK_Bjur%C3%B6klubb_Station_Jan-Dec_1928.zarr.zip",
38
  known_hash="sha256:6d87b7f79836ae6373cfab11260fe28787d93fe16199fefede6697ccd750f71a",
 
 
 
 
39
  )
40
  }
41
 
@@ -238,6 +242,8 @@ with gr.Blocks() as submit:
238
  gr.Warning(f"Maximum images you can upload is set to: {MAX_IMAGES}")
239
  return gr.update(value=None)
240
 
 
 
241
  return images
242
 
243
  run_button.click(
 
36
  "bjuröklubb": dict(
37
  url="https://git.smhi.se/ai-for-obs/data/-/raw/688c04f13e8e946962792fe4b4e0ded98800b154/raw_zarr/BJUR%C3%96KLUBB/DAGBOK_Bjur%C3%B6klubb_Station_Jan-Dec_1928.zarr.zip",
38
  known_hash="sha256:6d87b7f79836ae6373cfab11260fe28787d93fe16199fefede6697ccd750f71a",
39
+ ),
40
+ "härnösand": dict(
41
+ url="https://git.smhi.se/ai-for-obs/data/-/raw/688c04f13e8e946962792fe4b4e0ded98800b154/raw_zarr/H%C3%84RN%C3%96SAND/DAGBOK_H%C3%A4rn%C3%B6sand_Station_1934.zarr.zip",
42
+ known_hash="sha256:a58fdb6521214d0bd569c9325ce78d696738de28ce6ec869cde0d46616b697f2",
43
  )
44
  }
45
 
 
242
  gr.Warning(f"Maximum images you can upload is set to: {MAX_IMAGES}")
243
  return gr.update(value=None)
244
 
245
+ gr.Warning("Digitizing uploaded images is not implemented yet! Work in progress!")
246
+
247
  return images
248
 
249
  run_button.click(
examples/h/303/244rn/303/266sand.png ADDED