Application Development 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: 

May Developer Challenge - SAP AI Services - Week 2

noravonthenen
Developer Advocate
Developer Advocate

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

25 REPLIES 25

geek
Participant

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

geek_0-1715192123692.png

0 Kudos

Answer for Week 2: 

harsh_itaverma_0-1716490044396.png

 

Nagarajan-K
Explorer

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

xavisanse
Active Participant

this time the result is perfect! 

xavisanse_0-1715202217543.png

 

xavisanse
Active Participant

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

@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! 

M-K
Explorer

Here's my submission:

recipe2.jpg

Ruthiel
Product and Topic Expert
Product and Topic Expert

Hello @noravonthenen !
The code:

Ruthiel_0-1715363898122.png

And the output:

Ruthiel_1-1715363927370.png

 

MioYasutake
Active Contributor

My submission for week 2.

MioYasutake_0-1715375134602.png

 

gphadnis2000
Participant

Here is my submission.

gphadnis2000_0-1715407881981.png

 

Alpesa1990
Participant

My submission for this this task.

Code:

Alpesa1990_0-1715455591186.png

Response:

Alpesa1990_1-1715455640039.png

 

emiliocampo
Explorer

My submission:

emiliocampo_0-1715513556809.png

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

moh_ali_square
Participant

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

martaseq
Associate
Associate

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.

jasperdebie
Explorer

Hi!

My submission for this week:

jasperdebie_0-1715665505038.pngjasperdebie_1-1715665522580.png

Even the optional ingredient is in there 😄

jasperdebie_2-1715665584243.png

 

Hira
Explorer

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

 

 

Vitaliy-R
Developer Advocate
Developer Advocate
0 Kudos

Welcome to the Python Clud @Hira 🐍

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

 

sainithesh21
Active Participant


Here is my Week 2 Submission

sainithesh21_0-1715781214389.png

 

CameronWilson
Explorer

Here is my week 2 Submission

Jordi_C
Explorer

Great learning experience!

Screenshot_1.png

JoshuaLaw
Explorer

Was a great learning experience, thanks!

Vitaliy-R
Developer Advocate
Developer Advocate
0 Kudos

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

 

Mikkelj
Explorer

My Submission.

2 weeks away from putting AI Expert on my CV 😉

 

Mikkelj_0-1716458916133.png

 

sabarna17
Contributor
0 Kudos

🐍 asked for the recipe using sap_business_document_processing - 

sabarna17_0-1716836292822.png