Bit closer
This commit is contained in:
parent
d6afc46cb5
commit
5a572b10af
5 changed files with 169 additions and 26 deletions
|
|
@ -19,4 +19,4 @@
|
|||
(POST "/ocr/:uri" []
|
||||
:return String
|
||||
:path-params [uri :- String]
|
||||
(ocr (url-decode uri))))))
|
||||
{:i-read (ocr (url-decode uri))}))))
|
||||
|
|
|
|||
|
|
@ -34,9 +34,8 @@
|
|||
[b/NavbarToggler {:on-click #(swap! expanded? not)}]
|
||||
[b/Collapse {:is-open @expanded? :navbar true}
|
||||
[b/Nav {:class-name "mr-auto" :navbar true}
|
||||
[nav-link "#/" "Home" :home]
|
||||
[nav-link "#/about" "About" :about]
|
||||
[nav-link "#/transcribe" "Transcribe" :transcribe]]]]))
|
||||
[nav-link "#/" "Transcribe" :transcribe]
|
||||
[nav-link "#/about" "About" :about]]]]))
|
||||
|
||||
(defn about-page []
|
||||
[:div.container
|
||||
|
|
@ -67,7 +66,7 @@
|
|||
(secretary/set-config! :prefix "#")
|
||||
|
||||
(secretary/defroute "/" []
|
||||
(rf/dispatch [:navigate :home]))
|
||||
(rf/dispatch [:navigate :transcribe]))
|
||||
|
||||
(secretary/defroute "/about" []
|
||||
(rf/dispatch [:navigate :about]))
|
||||
|
|
|
|||
|
|
@ -13,9 +13,8 @@
|
|||
|
||||
|
||||
(defn form-page []
|
||||
[:div
|
||||
[:h1 "Transcribe the text of an image"]
|
||||
[:div.container {:id "main-container"}
|
||||
[:h1 "Transcribe the text of an image"]
|
||||
[:div
|
||||
[:p.widget
|
||||
[b/Label {:for "image-url" :title "URL of the image you wish to transcribe"}"Image URL"]
|
||||
|
|
@ -24,6 +23,5 @@
|
|||
[:p.widget
|
||||
[b/Label {:for "send"} "To transcribe the image"]
|
||||
[b/Button {:id "send" :on-click #(rf/dispatch [:fetch-transcription])} "Transcribe!"]]]
|
||||
[:div.transcription @(rf/subscribe [:transcription])]
|
||||
]])
|
||||
[:div.transcription @(rf/subscribe [:transcription])]])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue