Git Product home page Git Product logo

orpheus's Introduction

Orpheus

Poem transcription toolkit, for personal use and to learn more Elm and Haskell.

'Sup with that name?

Of course it ultimately is about Orpheus, but the choice to use it for this project was more directly inspired by Rainer Maria Rilke's 3rd Sonnet to Orpheus:

Ein Gott vermags. Wie aber, sag mir, soll
Mann ihm folgen durch die schmale Leier?
Sinn ist Zwiespalts. An der Kreuzung zweier
Herzwege steht kein Tempel für Apoll.

Gesang, wie du ihn lehrst, ist nicht Begehr,
nicht Werbung um ein endlich noch Erreichtes;
Gesang ist Dasein. Für den Gott ein Leichtes.
Wann aber sind wir? Und wann wendet er

an unser Sein die Erde und die Sterne?
Dies ists nicht, Jüngling, daß du liebst, wenn auch
die Stimme dann den Mund dir aufstößt,—lerne

vergessen, daß du aufsangst. Das verrinnt.
In Wahrheit singen, ist ein andrer Hauch.
Ein Hauch um nichts. Ein Wehn im Gott. Ein Wind.

Backend

Endpoints

Right now, only one of interest:

curl -H "Content-Type: application/json" -vd '{"gsURI":  "gs://orpheus-ocr-artifacts/IMG_5013.jpg"}' http://localhost:3030/api/poems/analyze > example.json

See the example-response.json file for an example.

Development

Should be up on localhost:3030 when running main from the repl, or when running stack exec

Setup

This project uses stack, so make sure that stack build works.

As for credentials, you'll need to set up a Google Cloud Platform project, with a publicly accessible bucket, and the Vision API enabled. Follow these instructions:

https://cloud.google.com/vision/docs/ocr

Currently, the Vision.hs module simply uses an API Key for authentication, follow the instructions here to generate one: https://cloud.google.com/docs/authentication/api-keys#using_an_api_key

The types in Vision.hs should be pretty good to indicate what the raw response from Google looks like, but here's the reference: https://cloud.google.com/vision/docs/reference/rest/v1/AnnotateImageResponse

Reference

N.B. Links are to good tutorials/docs, not necessarily the official libraries.

  • Aeson, for JSON encoding/decoding
  • Lens, for masochism (and some nifty data access I guess.)
  • Servant, for quite strongly typed RESTful API building.
  • Gogol for google storage.
  • servant-auth for authentication
  • servant-elm to generate types to be consumed by the frontend.

Frontend

Development

Run elm-live src/Main.elm and go to localhost:8000. Should reflect changes to code!

Reference

orpheus's People

Contributors

lfborjas avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.