From 4993f9fc97b81d1a1d3024b06d9ddc4ad4c3d811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ho=CC=88nicke?= Date: Fri, 7 Apr 2023 00:53:52 +0200 Subject: [PATCH] refactor: cleanup --- README.md | 14 ++++++++++---- main.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0be630f..b7b9b07 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ gptdeploy --description "Take a pdf file as input, and returns the text it conta The graphic below illustrates the process of creating a microservice and deploying it to the cloud. ```mermaid graph TB - AA[Task: 2d rendering of 3d object] --> B{think a} - AB[Test: http://.../file.pdf contains the word ''] --> B{think a} + AA[Task: Generate QR code from URL] --> B{think a} + AB[Test: https://www.example.com] --> B{think a} B -->|Identify Strategie 1| C[Strategy 1] B -->|Identify Strategie 2| D[Strategy 2] B -->|Identify Strategie N| E[Strategy N] @@ -55,12 +55,18 @@ graph TB 6. If it fails 10 times in a row, it moves on to the next approach. # Examples +## OCR ```bash -gptdeploy --description "Generate a QR code from a given text or URL" --test "https://www.example.com" +gptdeploy --description "Generate QR code from URL" --test "https://www.example.com" ``` ![](res/qr_example.png) +## 3d model info ```bash -gptdeploy --description "Extract information about a 3D model, such as vertex count and face count" --test "https://www.example.com/model.obj" +gptdeploy --description "Given a 3d object, return vertex count and face count" --test "https://www.example.com/model.obj" +``` +## Table extraction +```bash +--description "Given a URL, extract all tables as csv" --test "http://www.ins.tn/statistiques/90" ``` # 🤏 limitations for now diff --git a/main.py b/main.py index b26e9dd..cd5c586 100644 --- a/main.py +++ b/main.py @@ -155,7 +155,7 @@ The executor is hosted on {host}. This is an example how you can connect to the executor assuming the document (d) is already defined: from jina import Client, Document, DocumentArray client = Client(host='{host}') -response = client.post('/process', inputs=DocumentArray([d])) +response = client.post('/', inputs=DocumentArray([d])) # always use '/' print(response[0].text) # can also be blob in case of image/audio..., this should be visualized in the streamlit app ''' )