Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

May Developer Challenge - SAP AI Services - Week 2

noravonthenen
Developer Advocate
Developer Advocate
6,538

CHECK OUT WEEK 3 OF THIS CHALLENGE

Thank you so much for your participation last week and the great results! I am so happy to see your drive and experimental mindsets! I also really love the inspiration I got from all your favorite recipes! I will definitely try them out! And I loved the M-AI Developer Challenge pun comment!  

This week we want to use the Document Information Extraction Python SDK to extract information from the same recipe that you used in week 1 using the custom schema you created in the Document Information Extraction UI. With the Python SDK you can implement end-to-end use cases and process documents on a large scale.

  1. Use the Python IDE of your choice, create and activate a virtual environment and install the Document Information Extraction SDKpip install sap-business-document-processing
  2. Get your Document Information Extraction service key from your BTP trial account
  3. You will need your Schema ID which you can find in the URL of the UI when navigating to the schema you want to use.noravonthenen_4-1715153564740.png
  4. Send your document from week 1 to the Document Information Extraction instance via the Python script (you can use the default client)
  5. To SUBMIT your result simply reply to this discussion by pasting an image with your code and returned json like this:noravonthenen_1-1715153340454.png

Additional information:

!!! EXAMPLE CODE !!!

Repository with more examples

Week 1 challenge

27 REPLIES 27
Read only

geek61
Participant
6,415

Now that was an interesting challenge, learnt a lot of stuff. Changed the recipe but:

geek_0-1715192123692.png

Read only

0 Kudos
4,225

Answer for Week 2: 

harsh_itaverma_0-1716490044396.png

 

Read only

Nagarajan-K
Explorer
6,398

Not a python expert. So, used the swagger UI to extract the same json result output of the recipe document already loaded in week 1 to the default client. Tried from curl as well. 

NagarajanK_0-1715196682128.png

NagarajanK_1-1715196734509.png

Read only

xavisanse
Active Participant
6,345

this time the result is perfect! 

xavisanse_0-1715202217543.png

 

Read only

xavisanse
Active Participant
6,230

by the way, today i changed a little bit the code and pushed again the same doc.  and still having some issues with the recognition. Could be interesting to now if there is an estimation of how many documents you have to train by template (i assume that depends of each one) but to get an estimation cheers

Read only

5,310

@xavisanse As always with AI models, it depends on the document and the use case but the more documents you assign to your template with perfect extraction results the better 🙂 Also recipes are a particular difficult case as the layout can have immense differences! 

Read only

M-K
Active Participant
6,141

Here's my submission:

recipe2.jpg

Read only

Ruthiel
Product and Topic Expert
Product and Topic Expert
6,015

Hello @noravonthenen !
The code:

Ruthiel_0-1715363898122.png

And the output:

Ruthiel_1-1715363927370.png

 

Read only

MioYasutake
Active Contributor
5,991

My submission for week 2.

MioYasutake_0-1715375134602.png

 

Read only

gphadnis2000
Participant
5,730

Here is my submission.

gphadnis2000_0-1715407881981.png

 

Read only

Alpesa1990
Participant
5,693

My submission for this this task.

Code:

Alpesa1990_0-1715455591186.png

Response:

Alpesa1990_1-1715455640039.png

 

Read only

emiliocampo
Explorer
5,266

My submission:

emiliocampo_0-1715513556809.png

I'm getting the same result as when using the DoX UI

Read only

moh_ali_square
Participant
5,255

Hello everyone, 

Thanks for the opportunity, I had an issue with default client, I had to change it to the current client c_03, and it workd 😊

SAP_GEN_AI_DOX_food_recipe_python_client.png

Read only

martaseq
Associate
Associate
5,106

Here's my submission:

martaseq_0-1715605029751.png

Instead of using all the header fields defined in my schema for the header_fields parameter, I tried to filter which fields I wanted to fetch, but it seems to make no difference. It seems to always gives me all the fields in the schema.

Read only

jasperdebie
Explorer
4,974

Hi!

My submission for this week:

jasperdebie_0-1715665505038.pngjasperdebie_1-1715665522580.png

Even the optional ingredient is in there 😄

jasperdebie_2-1715665584243.png

 

Read only

Hira
Participant
4,824

Hi, 

Apologies for delay, Due to this exercise, I have installed Python on my personal computer for the first time. And face few small challenges. But it makes me realize I should learn Python at least for basic task. 🙂

Attaching the results of this challenge.

Hira_0-1715764086313.png

Hira_1-1715764150919.png

 

 

Read only

Vitaliy-R
Developer Advocate
Developer Advocate
0 Kudos
4,180

Welcome to the Python Clud @Hira 🐍

Hopefully, you decide to polish your Python skills with the next developer challenge next month

 

Read only

Sai_Nithesh_G
Active Participant
4,759


Here is my Week 2 Submission

sainithesh21_0-1715781214389.png

 

Read only

CameronWilson
Explorer
4,668

Here is my week 2 Submission

Read only

Read only

Jordi_C
Explorer
4,663

Great learning experience!

Screenshot_1.png

Read only

JoshuaLaw
Explorer
4,654

Was a great learning experience, thanks!

Read only

Vitaliy-R
Developer Advocate
Developer Advocate
0 Kudos
4,316

I must say that 100% confidence of the AI model doesn't make me confident in the results 🤓

Screenshot 2024-05-22 at 20.41.24.png

 

Read only

Mikkelj
Explorer
4,278

My Submission.

2 weeks away from putting AI Expert on my CV 😉

 

Mikkelj_0-1716458916133.png

 

Read only

sabarna17
Contributor
0 Kudos
3,922

🐍 asked for the recipe using sap_business_document_processing - 

sabarna17_0-1716836292822.png

Read only

Lajilekha
Associate
Associate
0 Kudos
3,524

It was quite initial learning side of Python installations and setting it up. Thanks. Here's my attempt result.

Screenshot 2024-06-20 at 6.30.09 PM.png

Read only

Lajilekha
Associate
Associate
0 Kudos
3,473

It was quite initial learning side of Python installations and setting it up. Thanks. Here's my attempt result.

Screenshot 2024-06-20 at 6.30.09 PM.png