diff --git a/ai-vector-image/apex/apex.md b/ai-vector-image/apex/apex.md new file mode 100644 index 000000000..0b1c4188c --- /dev/null +++ b/ai-vector-image/apex/apex.md @@ -0,0 +1,254 @@ +# Build an APEX app for AI Vector Search + +## Introduction + +This lab will walk you through the steps to create an APEX application that will leverage all of the data you have loaded plus AI Vector Search + +Estimated Lab Time: 20 minutes + +### Objectives + +In this lab, you will: +* Create a workspace for your application +* Create a page to search your images using AI Vector Search +* Create a page to display the details of an image +* Link the two pages together + +### Prerequisites (Optional) + +This lab assumes you have: +* All previous labs successfully completed + + +## Task 1: Create a Workspace and APEX User + +This task you will log into APEX with the ADMIN user and create a workspace for your specific application. Take note of the workspace, user and password for this application as it will be different than your database user. + +1. Open the "View Login Info" section of your workshop. + + ![Image alt text](images/sample1.png) + +2. You will use the APEX URL to open APEX + + ![Image alt text](images/sample1.png) + +3. Login using: + - APEX Workspace Name + - APEX Workspace User + - APEX Workspace Password + +4. It will ask you to change the password. You can change the password or you can use the existing password + +5. Click on "Create Workspace" + +6. For Workspace Name type in "Vector" and click Next + +7. For "Re-Use existing schema?" set this to Yes + +8. For Schema Name type in "ADMIN" and click Next. By doing this you have linked your application with your database schema where your tables reside. + +9. For the Identify Administrator section fill in: + - Administrator Username: vectoruser (This will be the user we will log into APEX with) + - Administrator Password: Welcome_1 (or any password you want just make sure to remember it as we will use this to log into APEX with) + - Email: test@test.com (Any email address will work.) + +10. Click Next + +11. Click Create Workspace + +12. Click Done + +13. Click on admin in the corner and click sign out + +14. Click on Return to Sign In Page + +15. On the page fill in the following values: + - Workspace: Vector + - Username: vectoruser + - Password: Welcome_1 (or the password you created) + +16. Again you will be asked to create a new password. You can use the same password or change it. + +17. You should now be on the main landing page of APEX + +## Task 2: Create Application +In this task you will create the application so you can start building pages. + +1. Click on App Builder + +2. Click on Create a New App + +3. Name your application. I'm going to use "Vector Image" then click Create Application + +## Task 3: Create Image Gallery Page +In this task you will create the Image Gallery page. This page will display the images that are brought back from your AI Vector Search based on input from the user. + +1. Click on Create Page + +2. Choose Cards + +3. On this page: + - Name: Image Gallery + - Table/View Name: VECTOR_IMAGE + - Click Next + +4. Choose Float + +5. For Title Column select the URL field from the table and click on Create Page + +6. On the left panel where you see the section called Body, right click on the word Body and choose "Create Page Item" We will use this as a text entry box for searching. + +7. If you click on the newly created Item on the left side of the page then on the right side of the page you will see the Page Item panel for that item. Make the following changes in the Page Item Panel: + - Change the name of the item you just created to P4_SEARCH_ITEM. + - Change Submit when Enter pressed to On + +8. In the panel on the left, Drag the P4_SEARCH_ITEM up above the Image Gallery page item + +9. Click on the Image Gallery page item and make the following changes in the Region panel on the right: + + - Under source change the Type to SQL Query + - For the Query paste the following: + ''' + + select URL, + IMG, + UFORM_DESC, + UFORM_VECTOR, + NLP_DESC, + NLP_VECTOR + from VECTOR_IMAGE + ORDER BY VECTOR_DISTANCE( uform_vector, vector_embedding(minilm12v2 using :P4_SEARCH_ITEM as data), EUCLIDEAN ) + FETCH EXACT FIRST 2 ROWS ONLY + + ''' + - In the Page Items to Submit section click on the menu button on the right and click on P4_SEARCH_ITEM + + +13. Click on the Attributes Tab + +14. Change the following: + - Card + - Primary Key Column 1: URL + - Media + - Source: Blob Column + - Blob Column: IMG + +15. Right click on P4_ORDER_BY in the left panel and select delete +16. Click on Save and then click run if you want to see your page +17. You will need to login to your application + - Username: vectoruser + - Password: Welcome_1 (Or whatever password you set it to) +18. Try typing in Fruit in the search bar + + +## Task 4: Create Image Detail Page +In this task you will create the Image Detail Page that will display information like the descriptions and vectors for the image selected. You will also create a link back to the Image Gallery Page. + +19. If you are not at the application builder home page click on the Application Breadcrumb at the top of the page +20. You should be on a page that looks like the image below +21. Click on Create Page + +22. Choose Interactive Report + +23. On this page: + - Name: Image Detail + - Table/View Name: VECTOR_IMAGE + - Click Create Page + +1. On the left panel where you see the section called Body, right click on the word Body and choose "Create Page Item" + +2. If you click on the newly created Item then on the right side of the page you will see the Page Item panel for that item. Make the following changes in the Page Item Panel: + - Name: P2_URL + - In the Default section change: + - Type "SQL Query (return single value) + - SQL Query: "select min(url) from vector_image" + +1. In the panel on the left, Drag the P2_URL up above the Image Detail page item + +2. Click on the Image Detail in the left panel to pull up its details + +3. In the Where Clause section paste "URL = :P2_URL" + +4. In the Page Items to Submit section click on the menu button on the right and click on P2_URL + +5. Back on the left side panel right click on image detail and click on duplicate + +6. Expand the column list of the top image detail page item and do the following: + - Right click on url and choose comment out + - Right click on img and choose comment out + - Right click on uform_vector and choose comment out + - Right click on nlp_vector and choose comment out + +1. Expand the columns list of the bottom image detail page item and do the following: + - Right click on url and choose comment out + - Right click on img and choose comment out + - Right click on uform_desc and choose comment out + - Right click on nlp_desc and choose comment out + +1. Right click on Body in the left panel and click on Create Button + +2. In the Button panel on the right change the following: + - Button Name: Back_to_Images + - The label should automatically change to Back To Images + - Under Behavior: + - Action: Redirect to to Page in this Application + - Target: Click on Link to bring up the dialog + - Click on the menu on the page box + - Click on the number next to the Image Gallery. In my case I would click on 2 + - Click on Ok + +1. Click on Save on the Page + +2. Click on Application 100 + +## Task 5: Linking Image Gallery to the Image Details +In this task you will link the Image Gallery page to the Image Detail Pages so when you click on an image you will get the details for it. + +1. If you are not at the application builder home page click on the Application Breadcrumb at the top of the page +2. You should be on a page that looks like the image below +3. Click on your Image Gallery page + +4. In the left panel Under Image Gallery right click on Actions and Choose create action + +5. In the Action Panel on the right make the following changes + - Identification Type: Media + - Under link Change + - Type: Redirect to Page in this Application + - Click on Target + - Click on the menu on the Page box which should pop up the list of pages in your application + - Click on the number of the page for the "Image Detail" page. In my case I would click on the 3 + - In the Set Items section click on the menu button next to the box for Name. It should show P2_URL. Click on that to select it + - For the Value box, again click on the menu button and here select URL + - Click Ok to save the dialog + - Click on the menu on the Link Attributes box and select URL + +1. Click Save on the page + + +## Task 6: Running the Application +1. **Figure out navigation to a page** + +2. If you need to login use: + - Username: vectorimage + - Password: Welcome_1 (or whatever password you set for vectorimage) + +3. Click on the Menu and select Image Gallery + +4. In your search bar type in Fruit or Surfing or whatever you want to search on +5. Click on an image to go to your detail page +6. On the detail page you can see both descriptions and what the vectors for the descriptions are. At the bottom is the button to go back to the Image Gallery page. +7. You can also use the menu in the top left and click on Image Gallery to get back to the Image Gallery + +Congradulations, you have built a AI Vector Search enabled application using images! + +## Learn More + +*(optional - include links to docs, white papers, blogs, etc)* + +* [URL text 1](http://docs.oracle.com) +* [URL text 2](http://docs.oracle.com) + +## Acknowledgements +* **Author** - David Start, Product Management +* **Contributors** - David Start, Product Management +* **Last Updated By/Date** - David Start, Sept 2024 diff --git a/ai-vector-image/data-load/images/sample1.png b/ai-vector-image/apex/images/sample1.png similarity index 100% rename from ai-vector-image/data-load/images/sample1.png rename to ai-vector-image/apex/images/sample1.png diff --git a/ai-vector-image/data-load/images/sample2.png b/ai-vector-image/apex/images/sample2.png similarity index 100% rename from ai-vector-image/data-load/images/sample2.png rename to ai-vector-image/apex/images/sample2.png diff --git a/ai-vector-image/data-load/data-load.md b/ai-vector-image/data-load/data-load.md deleted file mode 100644 index 8845db49c..000000000 --- a/ai-vector-image/data-load/data-load.md +++ /dev/null @@ -1,102 +0,0 @@ -# Title of the Lab - -## Introduction - -*Describe the lab in one or two sentences, for example:* This lab walks you through the steps to ... - -Estimated Time: -- minutes - -### About (Optional) -Enter background information here about the technology/feature or product used in this lab - no need to repeat what you covered in the introduction. Keep this section fairly concise. If you find yourself needing more than two sections/paragraphs, please utilize the "Learn More" section. - -### Objectives - -*List objectives for this lab using the format below* - -In this lab, you will: -* Objective 1 -* Objective 2 -* Objective 3 - -### Prerequisites (Optional) - -*List the prerequisites for this lab using the format below. Fill in whatever knowledge, accounts, etc. is needed to complete the lab. Do NOT list each previous lab as a prerequisite.* - -This lab assumes you have: -* An Oracle Cloud account -* All previous labs successfully completed - - -*Below, is the "fold"--where items are collapsed by default.* - -## Task 1: Concise Task Description - -(optional) Task 1 opening paragraph. - -1. Step 1 - - ![Image alt text](images/sample1.png) - - To create a link to local file you want the reader to download, use the following formats. _The filename must be in lowercase letters and CANNOT include any spaces._ - - Download the [starter file](files/starter-file.sql) SQL code. - - When the file type is recognized by the browser, it will attempt to render it. So you can use the following format to force the download dialog box. - - Download the [sample JSON code](files/sample.json?download=1). - - > Note: do not include zip files, CSV, PDF, PSD, JAR, WAR, EAR, bin, or exe files - you must have those objects stored somewhere else. We highly recommend using Oracle Cloud Object Store and creating a PAR URL instead. See [Using Pre-Authenticated Requests](https://docs.cloud.oracle.com/en-us/iaas/Content/Object/Tasks/usingpreauthenticatedrequests.htm) - -2. Step 2 - - ![Image alt text](images/sample1.png) - -4. Example with inline navigation icon ![Image alt text](images/sample2.png) click **Navigation**. - -5. Example with bold **text**. - - If you add another paragraph, add 3 spaces before the line. - -## Task 2: Concise Task Description - -1. Step 1 - tables sample - - Use tables sparingly: - - | Column 1 | Column 2 | Column 3 | - | --- | --- | --- | - | 1 | Some text or a link | More text | - | 2 |Some text or a link | More text | - | 3 | Some text or a link | More text | - -2. You can also include bulleted lists - make sure to indent 4 spaces: - - - List item 1 - - List item 2 - -3. Code examples - - ``` - Adding code examples - Indentation is important for the code example to appear inside the step - Multiple lines of code - Enclose the text you want to copy in . - ``` - -4. Code examples that include variables - - ``` - ssh -i - ``` - -## Learn More - -*(optional - include links to docs, white papers, blogs, etc)* - -* [URL text 1](http://docs.oracle.com) -* [URL text 2](http://docs.oracle.com) - -## Acknowledgements -* **Author** - -* **Contributors** - -- optional -* **Last Updated By/Date** - diff --git a/ai-vector-image/data-load/files/sample.json b/ai-vector-image/data-load/files/sample.json deleted file mode 100644 index 48109ed27..000000000 --- a/ai-vector-image/data-load/files/sample.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "quiz": { - "sport": { - "q1": { - "question": "Which one is correct team name in NBA?", - "options": [ - "New York Bulls", - "Los Angeles Kings", - "Golden State Warriros", - "Huston Rocket" - ], - "answer": "Huston Rocket" - } - }, - "maths": { - "q1": { - "question": "5 + 7 = ?", - "options": [ - "10", - "11", - "12", - "13" - ], - "answer": "12" - }, - "q2": { - "question": "12 - 8 = ?", - "options": [ - "1", - "2", - "3", - "4" - ], - "answer": "4" - } - } - } -} diff --git a/ai-vector-image/data-load/files/starter-file.sql b/ai-vector-image/data-load/files/starter-file.sql deleted file mode 100644 index 9d7e762e8..000000000 --- a/ai-vector-image/data-load/files/starter-file.sql +++ /dev/null @@ -1,101 +0,0 @@ -/* NOTE: Files cannot contain empty lines (line breaks) */ -/* Specify the base URL that you copied from your files in OCI Object Storage in the define base_URL line below*/ -/* change idthydc0kinr to your real namespace. The name is case-sensitive. */ -/* change ADWCLab to your real bucket name. The name is case-sensitive. */ -/* change us-phoenix-1 to your real region name. The name is case-sensitive. */ -/* you can find these values on the OCI Console .. Storage .. Object Storage screen */ -set define on -define base_URL='https://objectstorage.us-phoenix-1.oraclecloud.com/n/idthydc0kinr/b/ADWCLab/o' -/* copy Channels table */ -begin - dbms_cloud.copy_data( - table_name =>'CHANNELS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/chan_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -/* copy Countries table */ -begin - dbms_cloud.copy_data( - table_name =>'COUNTRIES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/coun_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -/* Copy customers */ -begin - dbms_cloud.copy_data( - table_name =>'CUSTOMERS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/cust1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SUPPLEMENTARY_DEMOGRAPHICS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dem1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dmsal_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'PRODUCTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prod1v3.dat', - format => json_object('delimiter' value '|', 'quote' value '^', 'ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'PROMOTIONS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prom1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/sale1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'TIMES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/time_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'COSTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/costs.dat', - format => json_object('ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); -end; -/ diff --git a/ai-vector-image/generate/generate.md b/ai-vector-image/generate/generate.md new file mode 100644 index 000000000..bcb1fde85 --- /dev/null +++ b/ai-vector-image/generate/generate.md @@ -0,0 +1,55 @@ +# Getting Familiar with Models and Notebooks + +## Introduction + +This lab will walk you through working with models, preprocessors and general python notebooks. By the end you will convert an image to text and should be familiar with the steps to run the next set of labs. + +Estimated Lab Time: 15 minutes + +### Objectives + +In this lab, you will: +* Setup the necessary libraries +* Load various preprocessors and models +* Run the steps to convert an image to text + +### Prerequisites (Optional) + +This lab assumes you have: +* All previous labs successfully completed + + +## Task 1: Open Notebook + +This task will have you login to the Jupyter Notebook environment and run the specific notebook for this lab. + +1. **If you are already logged into the Jupyter Notebook environment skip to step 5 otherwise** open the "View Login Info" section of your workshop. + + ![Image alt text](images/sample1.png) + +2. Copy the Jupyter Notebook Password and Click the Jupyter Notebook URL + + ![Image alt text](images/sample1.png) + +3. Paste the Jupyter Notebook Password you copied in the previous step into the Notebook +4. You should now be on the Jupyter Notebook landing screen +5. In the left File Explorer panel open the vector_lab folder and open the **1_generate_lab.ipynb** notebook +6. Follow the steps in the notebook. A few things to remember: + - There are markdown blocks and code blocks mixed together + - The run button can be used on both code and markdown blocks (markdown just advances you to the next block) + - When you run a code block there are [ ] next to the code block. If it changes to a [\*] that means it running. If it has a number like [\1] then its done running. + - Passwords and additional information you may need will be found in the "View Login Info" where the Jupyter Notebook link was + +Once you have completed the steps in the notebook please return to the workshop so you can continue to the next lab. + +## Learn More + +*(optional - include links to docs, white papers, blogs, etc)* + +* [URL text 1](http://docs.oracle.com) +* [URL text 2](http://docs.oracle.com) + +## Acknowledgements +* **Author** - David Start, Product Management +* **Contributors** - David Start, Product Management +* **Last Updated By/Date** - David Start, Sept 2024 diff --git a/ai-vector-image/provision/images/sample1.png b/ai-vector-image/generate/images/sample1.png similarity index 100% rename from ai-vector-image/provision/images/sample1.png rename to ai-vector-image/generate/images/sample1.png diff --git a/ai-vector-image/provision/images/sample2.png b/ai-vector-image/generate/images/sample2.png similarity index 100% rename from ai-vector-image/provision/images/sample2.png rename to ai-vector-image/generate/images/sample2.png diff --git a/ai-vector-image/howtouse-deletewhenfinished.md b/ai-vector-image/howtouse-deletewhenfinished.md deleted file mode 100644 index 27dec4b5b..000000000 --- a/ai-vector-image/howtouse-deletewhenfinished.md +++ /dev/null @@ -1,73 +0,0 @@ -# Workshop with a single set of labs - -## Instructions - Delete this file when finished - -1. Open the sample-workshop template in Atom or Visual Studio Code -2. We pre-created 5 folders. A workshop is created out of multiple labs. -3. Remove the comments like this one: *List objectives for this lab* -4. Make sure you use lower case folder and file name and dashes for spaces (setup-adb NOT Setup_ADB) -5. Your image names should have descriptive names. Not just adb1, adb2, adb3. For handicap accessibility, we need the image descriptions to explain what the image looks like. Remember all lowercase and dashes. -6. Download our QA doc from WMS. We find workshops get in production quicker when you know what's needed to move to production up front and you use the skeleton. - -PS: You do not need a Readme.md. Readme's exist only at the top library levels. We direct all traffic to LiveLabs since we can't track usage on GitHub. Do not create any direct links to GitHub, your workshop may be super popular but we can't track it so no one will know. - -## Absolute Path for Oracle Cloud menu Navigation - -**Lab 1: Provision an Instance -> Step 0: Use these Standardized Pictures for Oracle Cloud Navigation (Commonly for Provisioning)** - We've included a list of common screenshots for navigating the Oracle Cloud Menu. Please read this section and use the relevant absolute path images where appropriate. This will future proof your workshop in case of Oracle Cloud user interface updates. - -## Folder Structure - -In this example, the goal is to create several "children" workshops from one longer "parent" workshop. The children are made up of parts from the parent. - -sample-workshop/ - -- individual labs - - provision/ - setup/ - dataload/ - query/ - introduction/ - introduction.md -- description of the everything workshop, note that it is a "lab" since there is only one - - workshops/ - freetier/ -- freetier version of the workshop - index.html - manifest.json - livelabs/ -- livelabs version of the workshop - index.html - manifest.json - - -### FreeTier vs LiveLabs - -* "FreeTier" - includes Free Trials, Paid Accounts, and for some workshops, Always Free accounts (brown button) -* "LiveLabs" - these are workshops that use Oracle-provided tenancies (green button) -* "Desktop" - this is a new deployment where the workshop is encapsulated in a NoVNC environment running in a compute instance - -### About the Workshop - -The workshop includes all 6 of the individual labs in a single sequence. - -The folder structure includes an Introduction "lab" that describes the workshop as a complete set of 6 labs. Note: you may not need to have a different introduction for each of the parent and child versions of the workshops, this is illustrative only. - -Look at the product-name-workshop/freetier folder and look at the manifest.json file to see the structure. - -> **Note:** The use of "Lab n:" in the titles is optional - -The Prerequisite "lab" is the first lab in a common folder on the oracle-livelabs/common repo. Because this lab already exists, we can use a RAW/absolute URL instead: - - ``` - "filename": "https://oracle-livelabs.github.io/common/labs/cloud-login/cloud-login-livelabs2.md" }, - ``` - -The manifest.json file needs to know the location of each lab relative to where it exists in the hierarchy. In this structure, labs are located two levels up, for example: - - ``` - "filename": "../../provision/provision.md" - ``` - -### For example: - -This [APEX Workshop](https://oracle-livelabs.github.io/apex/spreadsheet/workshops/freetier/) is a good example of a workshop with a single set of labs: [https://github.com/oracle-livelabs/apex/tree/main/spreadsheet](https://github.com/oracle-livelabs/apex/tree/main/spreadsheet). - - diff --git a/ai-vector-image/query/images/sample1.png b/ai-vector-image/load-desc/images/sample1.png similarity index 100% rename from ai-vector-image/query/images/sample1.png rename to ai-vector-image/load-desc/images/sample1.png diff --git a/ai-vector-image/query/images/sample2.png b/ai-vector-image/load-desc/images/sample2.png similarity index 100% rename from ai-vector-image/query/images/sample2.png rename to ai-vector-image/load-desc/images/sample2.png diff --git a/ai-vector-image/load-desc/load-desc.md b/ai-vector-image/load-desc/load-desc.md new file mode 100644 index 000000000..3a5522d58 --- /dev/null +++ b/ai-vector-image/load-desc/load-desc.md @@ -0,0 +1,54 @@ +# Create and Load Image Descriptions + +## Introduction + +This lab will walk you through generating descriptions for all of the images and loading them into the database. + +Estimated Lab Time: 15 minutes + +### Objectives + +In this lab, you will: +* Use two models to generate descriptions for each image +* Load the descriptions and images into a databse + +### Prerequisites (Optional) + +This lab assumes you have: +* All previous labs successfully completed + + +## Task 1: Open Notebook + +This task will have you login to the Jupyter Notebook environment and run the specific notebook for this lab. + +1. **If you are already logged into the Jupyter Notebook environment skip to step 5 otherwise** open the "View Login Info" section of your workshop. + + ![Image alt text](images/sample1.png) + +2. Copy the Jupyter Notebook Password and Click the Jupyter Notebook URL + + ![Image alt text](images/sample1.png) + +3. Paste the Jupyter Notebook Password you copied in the previous step into the Notebook +4. You should now be on the Jupyter Notebook landing screen +5. In the left File Explorer panel open the vector_lab folder and open the **2_load_lab.ipynb** notebook +6. Follow the steps in the notebook. A few things to remember: + - There are markdown blocks and code blocks mixed together + - The run button can be used on both code and markdown blocks (markdown just advances you to the next block) + - When you run a code block there are [ ] next to the code block. If it changes to a [\*] that means it running. If it has a number like [\1] then its done running. + - Passwords and additional information you may need will be found in the "View Login Info" where the Jupyter Notebook link was + +Once you have completed the steps in the notebook please return to the workshop so you can continue to the next lab. + +## Learn More + +*(optional - include links to docs, white papers, blogs, etc)* + +* [URL text 1](http://docs.oracle.com) +* [URL text 2](http://docs.oracle.com) + +## Acknowledgements +* **Author** - David Start, Product Management +* **Contributors** - David Start, Product Management +* **Last Updated By/Date** - David Start, Sept 2024 diff --git a/ai-vector-image/setup/images/sample1.png b/ai-vector-image/load-vectors/images/sample1.png similarity index 100% rename from ai-vector-image/setup/images/sample1.png rename to ai-vector-image/load-vectors/images/sample1.png diff --git a/ai-vector-image/setup/images/sample2.png b/ai-vector-image/load-vectors/images/sample2.png similarity index 100% rename from ai-vector-image/setup/images/sample2.png rename to ai-vector-image/load-vectors/images/sample2.png diff --git a/ai-vector-image/load-vectors/load-vectors.md b/ai-vector-image/load-vectors/load-vectors.md new file mode 100644 index 000000000..debbcc028 --- /dev/null +++ b/ai-vector-image/load-vectors/load-vectors.md @@ -0,0 +1,55 @@ +# Create and Load Vectors into the Database + +## Introduction + +This lab will walk you through the steps to load models into the database and then use them to create vectors in the database. + +Estimated Lab Time: 15 minutes + +### Objectives + +In this lab, you will: +* Load a model into the database +* Create vectors for the description fields +* Perform an AI Vector Search + +### Prerequisites (Optional) + +This lab assumes you have: +* All previous labs successfully completed + + +## Task 1: Open Notebook + +This task will have you login to the Jupyter Notebook environment and run the specific notebook for this lab. + +1. **If you are already logged into the Jupyter Notebook environment skip to step 5 otherwise** open the "View Login Info" section of your workshop. + + ![Image alt text](images/sample1.png) + +2. Copy the Jupyter Notebook Password and Click the Jupyter Notebook URL + + ![Image alt text](images/sample1.png) + +3. Paste the Jupyter Notebook Password you copied in the previous step into the Notebook +4. You should now be on the Jupyter Notebook landing screen +5. In the left File Explorer panel open the vector_lab folder and open the **3_create_vectors.ipynb** notebook +6. Follow the steps in the notebook. A few things to remember: + - There are markdown blocks and code blocks mixed together + - The run button can be used on both code and markdown blocks (markdown just advances you to the next block) + - When you run a code block there are [ ] next to the code block. If it changes to a [\*] that means it running. If it has a number like [\1] then its done running. + - Passwords and additional information you may need will be found in the "View Login Info" where the Jupyter Notebook link was + +Once you have completed the steps in the notebook please return to the workshop so you can continue to the next lab. + +## Learn More + +*(optional - include links to docs, white papers, blogs, etc)* + +* [URL text 1](http://docs.oracle.com) +* [URL text 2](http://docs.oracle.com) + +## Acknowledgements +* **Author** - David Start, Product Management +* **Contributors** - David Start, Product Management +* **Last Updated By/Date** - David Start, Sept 2024 diff --git a/ai-vector-image/provision/files/starter-file.sql b/ai-vector-image/provision/files/starter-file.sql deleted file mode 100644 index 9d7e762e8..000000000 --- a/ai-vector-image/provision/files/starter-file.sql +++ /dev/null @@ -1,101 +0,0 @@ -/* NOTE: Files cannot contain empty lines (line breaks) */ -/* Specify the base URL that you copied from your files in OCI Object Storage in the define base_URL line below*/ -/* change idthydc0kinr to your real namespace. The name is case-sensitive. */ -/* change ADWCLab to your real bucket name. The name is case-sensitive. */ -/* change us-phoenix-1 to your real region name. The name is case-sensitive. */ -/* you can find these values on the OCI Console .. Storage .. Object Storage screen */ -set define on -define base_URL='https://objectstorage.us-phoenix-1.oraclecloud.com/n/idthydc0kinr/b/ADWCLab/o' -/* copy Channels table */ -begin - dbms_cloud.copy_data( - table_name =>'CHANNELS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/chan_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -/* copy Countries table */ -begin - dbms_cloud.copy_data( - table_name =>'COUNTRIES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/coun_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -/* Copy customers */ -begin - dbms_cloud.copy_data( - table_name =>'CUSTOMERS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/cust1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SUPPLEMENTARY_DEMOGRAPHICS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dem1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dmsal_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'PRODUCTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prod1v3.dat', - format => json_object('delimiter' value '|', 'quote' value '^', 'ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'PROMOTIONS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prom1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/sale1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'TIMES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/time_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'COSTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/costs.dat', - format => json_object('ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); -end; -/ diff --git a/ai-vector-image/provision/images/pic1.png b/ai-vector-image/provision/images/pic1.png deleted file mode 100644 index b24990ceb..000000000 Binary files a/ai-vector-image/provision/images/pic1.png and /dev/null differ diff --git a/ai-vector-image/provision/images/pic2.png b/ai-vector-image/provision/images/pic2.png deleted file mode 100644 index af962c18a..000000000 Binary files a/ai-vector-image/provision/images/pic2.png and /dev/null differ diff --git a/ai-vector-image/provision/provision.md b/ai-vector-image/provision/provision.md deleted file mode 100644 index b6d2c5c17..000000000 --- a/ai-vector-image/provision/provision.md +++ /dev/null @@ -1,94 +0,0 @@ -# Title of the Lab - -## Introduction - -*Describe the lab in one or two sentences, for example:* This lab walks you through the steps to ... - -Estimated Time: -- minutes - -### About (Optional) -Enter background information here about the technology/feature or product used in this lab - no need to repeat what you covered in the introduction. Keep this section fairly concise. If you find yourself needing more than two sections/paragraphs, please utilize the "Learn More" section. - -### Objectives - -*List objectives for this lab using the format below* - -In this lab, you will: -* Objective 1 -* Objective 2 -* Objective 3 - -### Prerequisites (Optional) - -*List the prerequisites for this lab using the format below. Fill in whatever knowledge, accounts, etc. is needed to complete the lab. Do NOT list each previous lab as a prerequisite.* - -This lab assumes you have: -* An Oracle Cloud account -* All previous labs successfully completed - - -*This is the "fold" - below items are collapsed by default* - -## Task 1: Concise Task Description - -(optional) Task 1 opening paragraph. - -1. Step 1 - - ![Image alt text](images/sample1.png) - - > **Note:** Use this format for notes, hints, and tips. Only use one "Note" at a time in a step. - -2. Step 2 - - ![Image alt text](images/sample1.png) - -4. Example with inline navigation icon ![Image alt text](images/sample2.png) click **Navigation**. - -5. Example with bold **text**. - - If you add another paragraph, add 3 spaces before the line. - -## Task 2: Concise Task Description - -1. Step 1 - tables sample - - Use tables sparingly: - - | Column 1 | Column 2 | Column 3 | - | --- | --- | --- | - | 1 | Some text or a link | More text | - | 2 |Some text or a link | More text | - | 3 | Some text or a link | More text | - -2. You can also include bulleted lists - make sure to indent 4 spaces: - - - List item 1 - - List item 2 - -3. Code examples - - ``` - Adding code examples - Indentation is important for the code example to appear inside the step - Multiple lines of code - Enclose the text you want to copy in . - ``` - -4. Code examples that include variables - - ``` - ssh -i - ``` - -## Learn More - -*(optional - include links to docs, white papers, blogs, etc)* - -* [URL text 1](http://docs.oracle.com) -* [URL text 2](http://docs.oracle.com) - -## Acknowledgements -* **Author** - -* **Contributors** - -- optional -* **Last Updated By/Date** - diff --git a/ai-vector-image/query/files/starter-file.sql b/ai-vector-image/query/files/starter-file.sql deleted file mode 100644 index 9d7e762e8..000000000 --- a/ai-vector-image/query/files/starter-file.sql +++ /dev/null @@ -1,101 +0,0 @@ -/* NOTE: Files cannot contain empty lines (line breaks) */ -/* Specify the base URL that you copied from your files in OCI Object Storage in the define base_URL line below*/ -/* change idthydc0kinr to your real namespace. The name is case-sensitive. */ -/* change ADWCLab to your real bucket name. The name is case-sensitive. */ -/* change us-phoenix-1 to your real region name. The name is case-sensitive. */ -/* you can find these values on the OCI Console .. Storage .. Object Storage screen */ -set define on -define base_URL='https://objectstorage.us-phoenix-1.oraclecloud.com/n/idthydc0kinr/b/ADWCLab/o' -/* copy Channels table */ -begin - dbms_cloud.copy_data( - table_name =>'CHANNELS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/chan_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -/* copy Countries table */ -begin - dbms_cloud.copy_data( - table_name =>'COUNTRIES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/coun_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -/* Copy customers */ -begin - dbms_cloud.copy_data( - table_name =>'CUSTOMERS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/cust1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SUPPLEMENTARY_DEMOGRAPHICS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dem1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dmsal_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'PRODUCTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prod1v3.dat', - format => json_object('delimiter' value '|', 'quote' value '^', 'ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'PROMOTIONS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prom1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/sale1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'TIMES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/time_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'COSTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/costs.dat', - format => json_object('ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); -end; -/ diff --git a/ai-vector-image/query/query.md b/ai-vector-image/query/query.md deleted file mode 100644 index fd9145482..000000000 --- a/ai-vector-image/query/query.md +++ /dev/null @@ -1,243 +0,0 @@ -# Title of the Lab - -## Introduction - -*Describe the lab in one or two sentences, for example:* This lab walks you through the steps to ... - -Estimated Lab Time: -- minutes - -### About (Optional) -Enter background information here about the technology/feature or product used in this lab - no need to repeat what you covered in the introduction. Keep this section fairly concise. If you find yourself needing more than two sections/paragraphs, please utilize the "Learn More" section. - -### Objectives - -*List objectives for this lab using the format below* - -In this lab, you will: -* Objective 1 -* Objective 2 -* Objective 3 - -### Prerequisites (Optional) - -*List the prerequisites for this lab using the format below. Fill in whatever knowledge, accounts, etc. is necessary to complete the lab. Do NOT list each previous lab as a prerequisite.* - -This lab assumes you have: -* An Oracle Cloud account -* All previous labs successfully completed - - -*This is the "fold" - below items are collapsed by default* - -## Task 1: Concise Task Description - -(optional) Task 1 opening paragraph. - -1. Open the "View Login Info" section of your workshop. - - ![Image alt text](images/sample1.png) - -2. You will use the APEX URL to open APEX - - ![Image alt text](images/sample1.png) - -3. Login using - - APEX Workspace Name - - APEX Workspace User - - APEX Workspace Password - -4. It will ask you to change the password. You can change the password or you can use the existing password - -5. Click on "Create Workspace" - -6. For Workspace Name type in "Vector" and click Next - -7. For "Re-Use existing schema?" set this to Yes - -8. For Schema Name type in "ADMIN" - -9. For the Identify Administrator section fill in: -- Administrator Username: vectoruser -- Administrator Password: Welcome_1 (or any password you want) -- Email: test@test.com - -10. Click Create - -11. Click Done - -12. Click on admin in the corner and click sign out - -13. Click on Return to Sign In Page - -14. On the page fill in the following values: -- Vector -- vectoruser -- Welcome_1 - -15. Again you will be asked to create a new password. You can use the same password or change it. - -16. You should now be on the main landing page of APEX - -## Task 2: Concise Task Description - -1. Click on App Builder - -2. Click on Create a New App - -3. Name your application. I'm going to use "Vector Image" then click Create Application - -4. Click on Create Page - -5. Choose Interactive Report - -6. On this page: -- Name: Image Detail -- Table/View Name: VECTOR_IMAGE -- Click Create Page - -7. On the left panel where you see the section called Body, right click on the word Body and choose "Create Page Item" - -8. If you want a bigger window to work in you can expand the right window where the page item definition is by dragging the edge to the left. - -9. In the Page Item window change the following: -- Name: P2_URL -- In the Default section change: - - Type "SQL Query (return single value) - - SQL Query: "select min(url) from vector_image" - -10. Drag the P2_URL in the left window above the Image Detail in the Body section - -11. Click on the Image Detail in the left window to pull up its details - -12. In the Where Clause section paste "URL = :P2_URL" - -13. Right below it type in P2_URL into page items to submit. - -14. Back on the left side panel right click on image detail and click on duplicate - -15. Expand the column list of the top image detail page item and do the following: -- Right click on url and choose comment out -- Right click on img and choose comment out -- Right click on uform_vector and choose comment out -- Right click on nlp_vector and choose comment out - -16. Expand the columns list of the bottom image detail page item and do the following: -- Right click on url and choose comment out -- Right click on img and choose comment out -- Right click on uform_desc and choose comment out -- Right click on nlp_desc and choose comment out - -17. Click on Save - -18. We will come back later to add a return button once we have created our next page - -19. Click on the Application 100 breadcrumb at the top of the page - -## Task 3: Concise Task Description - -4. Click on Create Page - -5. Choose Cards - -6. On this page: -- Name: Image Gallery -- Table/View Name: VECTOR_IMAGE -- Click Next - -7. Choose Float - -8. For Title Column select URL and click on Create Page - -9. On the left panel where you see the section called Body, right click on the word Body and choose "Create Page Item" - -8. Change the name of the item you just created to P4_SEARCH_ITEM. You can see the details on the right pannel (Page Item view) - -9. Change Submit when Enter pressed - -9. Drag the P4_SEARCH_ITEM up above the Image Gallery in the panel on the left - -10. Click on the Image Gallery page item and make the following Changes: -- Under source change the Type to SQL Query - - For the Query paste the following: -''' -select URL, - IMG, - UFORM_DESC, - UFORM_VECTOR, - NLP_DESC, - NLP_VECTOR - from VECTOR_IMAGE - ORDER BY VECTOR_DISTANCE( uform_vector, vector_embedding(minilm12v2 using :P4_SERACH_ITEM as data), EUCLIDEAN ) - FETCH APPROX FIRST 2 rows ONLY WITH TARGET ACCURACY 90 -''' -- In the Page Items to Submit section type "P4_SERACH_ITEM" - - In Order by Change Type to None - -1. Click on the Attributes Tab - -2. Change the following: - - Card - - Primary Key Column 1: URL - - Media - - Source: Blob Column - - Blob Column: IMG - -3. Right click on P4_ORDER_BY in the left panel and select delete - -4. Under Image Gallery right click on Actions and Choose create action - -5. On the left in the Actions menu make the following changes -- Change Type: Media -- Under link Change - - Type: Redirect to Page in this Application - - Click on Target - - Click on the menu on the Page box which should pop up the list of pages in your application - - Click on the number of the page for the "Image Detail" page. In my case I would click on the 2 - - In the Set Items section click on the menu button next to the box for Name. It should show P2_URL. Click on that to select it - - For the Value box, again click on the menu button and here select URL - - Click Ok to save the dialog - - Click on the menu on the Link Attributes box and select URL - -1. Click Save on the page - -2. Click on Application 100 breadcrumb at the top of the page - -## Task 4: Concise Task Description - -1. Click on the Image Detail page - -2. Right click on Body in the left panel and click on Create Button - -3. In the Button panel on the right change the following: -- Button Name: Back_to_Images -- Label: Back to Images -- Behavior - - Action: Redirecto to Page in this Application - - Target: Click on Link to bring up the dialog - - Click on the menu on the page box - - Click on the number next to the Image Gallery. In my case I would click on 4 - - Click on Ok - -4. Click on Save on the Page - -5. Click on Application 100 - -## Task 4: Concise Task Description - -1. Click on Run Application -2. To login use: -- Username: vectorimage -- Password: Welcome_1 (or whatever password you set for vectorimage) - -3. -## Learn More - -*(optional - include links to docs, white papers, blogs, etc)* - -* [URL text 1](http://docs.oracle.com) -* [URL text 2](http://docs.oracle.com) - -## Acknowledgements -* **Author** - -* **Contributors** - -- optional -* **Last Updated By/Date** - diff --git a/ai-vector-image/setup/files/starter-file.sql b/ai-vector-image/setup/files/starter-file.sql deleted file mode 100644 index 9d7e762e8..000000000 --- a/ai-vector-image/setup/files/starter-file.sql +++ /dev/null @@ -1,101 +0,0 @@ -/* NOTE: Files cannot contain empty lines (line breaks) */ -/* Specify the base URL that you copied from your files in OCI Object Storage in the define base_URL line below*/ -/* change idthydc0kinr to your real namespace. The name is case-sensitive. */ -/* change ADWCLab to your real bucket name. The name is case-sensitive. */ -/* change us-phoenix-1 to your real region name. The name is case-sensitive. */ -/* you can find these values on the OCI Console .. Storage .. Object Storage screen */ -set define on -define base_URL='https://objectstorage.us-phoenix-1.oraclecloud.com/n/idthydc0kinr/b/ADWCLab/o' -/* copy Channels table */ -begin - dbms_cloud.copy_data( - table_name =>'CHANNELS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/chan_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -/* copy Countries table */ -begin - dbms_cloud.copy_data( - table_name =>'COUNTRIES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/coun_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -/* Copy customers */ -begin - dbms_cloud.copy_data( - table_name =>'CUSTOMERS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/cust1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SUPPLEMENTARY_DEMOGRAPHICS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dem1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/dmsal_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'PRODUCTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prod1v3.dat', - format => json_object('delimiter' value '|', 'quote' value '^', 'ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'PROMOTIONS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/prom1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'SALES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/sale1v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'TIMES', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/time_v3.dat', - format => json_object('ignoremissingcolumns' value 'true', 'removequotes' value 'true', 'dateformat' value 'YYYY-MM-DD-HH24-MI-SS', 'blankasnull' value 'true') - ); -end; -/ -begin - dbms_cloud.copy_data( - table_name =>'COSTS', - credential_name =>'OBJ_STORE_CRED', - file_uri_list =>'&base_URL/costs.dat', - format => json_object('ignoremissingcolumns' value 'true', 'dateformat' value 'YYYY-MM-DD', 'blankasnull' value 'true') - ); -end; -/ diff --git a/ai-vector-image/setup/setup.md b/ai-vector-image/setup/setup.md deleted file mode 100644 index fe5d3a51d..000000000 --- a/ai-vector-image/setup/setup.md +++ /dev/null @@ -1,92 +0,0 @@ -# Title of the Lab - -## Introduction - -*Describe the lab in one or two sentences, for example:* This lab walks you through the steps to ... - -Estimated Lab Time: -- minutes - -### About (Optional) -Enter background information here about the technology/feature or product used in this lab - no need to repeat what you covered in the introduction. Keep this section fairly concise. If you find yourself needing more than two sections/paragraphs, please utilize the "Learn More" section. - -### Objectives - -*List objectives for this lab using the format below* - -In this lab, you will: -* Objective 1 -* Objective 2 -* Objective 3 - -### Prerequisites (Optional) - -*List the prerequisites for this lab using the format below. Fill in whatever knowledge, accounts, etc. is necessary to complete the lab. Do NOT list each previous lab as a prerequisite.* - -This lab assumes you have: -* An Oracle Cloud account -* All previous labs successfully completed - - -*This is the "fold" - below items are collapsed by default* - -## Task 1: Concise Task Description - -(optional) Task 1 opening paragraph. - -1. Step 1 - - ![Image alt text](images/sample1.png) - -2. Step 2 - - ![Image alt text](images/sample1.png) - -4. Example with inline navigation icon ![Image alt text](images/sample2.png) click **Navigation**. - -5. Example with bold **text**. - - If you add another paragraph, add 3 spaces before the line. - -## Task 2: Concise Task Description - -1. Step 1 - tables sample - - Use tables sparingly: - - | Column 1 | Column 2 | Column 3 | - | --- | --- | --- | - | 1 | Some text or a link | More text | - | 2 |Some text or a link | More text | - | 3 | Some text or a link | More text | - -2. You can also include bulleted lists - make sure to indent 4 spaces: - - - List item 1 - - List item 2 - -3. Code examples - - ``` - Adding code examples - Indentation is important for the code example to appear inside the step - Multiple lines of code - Enclose the text you want to copy in . - ``` - -4. Code examples that include variables - - ``` - ssh -i - ``` - -## Learn More - -*(optional - include links to docs, white papers, blogs, etc)* - -* [URL text 1](http://docs.oracle.com) -* [URL text 2](http://docs.oracle.com) - -## Acknowledgements -* **Author** - -* **Contributors** - -- optional -* **Last Updated By/Date** - diff --git a/ai-vector-image/tables/tables.md b/ai-vector-image/tables/tables.md deleted file mode 100644 index 529dc6f7c..000000000 --- a/ai-vector-image/tables/tables.md +++ /dev/null @@ -1,54 +0,0 @@ -# Tables in LiveLabs - -## Tables are cool! - -You can define a table in Markdown just like so: - -``` -| Tables | Are | Cool | -| ------------- | :-----------: | ----: | -| **col 3 is** | right-aligned | $1600 | -| col 2 is | *centered* | $12 | -| zebra stripes | ~~are neat~~ | $1 | -``` -The result looks like this: - -| Tables | Are | Cool | -| ------------- | :-----------: | ----: | -| **col 3 is** | right-aligned | $1600 | -| col 2 is | *centered* | $12 | -| zebra stripes | ~~are neat~~ | $1 | - -You can see that there is a default table caption provided which is by default a concatenation of the workshop title and the lab title. - -If you don't like the default, you can also provide your own table title by adding the below the table definition: - -``` -{: title="My table title"} -``` - -The complete markdown looks like this: - -``` -| Tables | Are | Cool | -| ------------- | :-----------: | ----: | -| **col 3 is** | right-aligned | $1600 | -| col 2 is | *centered* | $12 | -| zebra stripes | ~~are neat~~ | $1 | -{: title="My table title"} -``` - -Now our table looks like this: - -| Tables | Are | Cool | -| ------------- | :-----------: | ----: | -| **col 3 is** | right-aligned | $1600 | -| col 2 is | *centered* | $12 | -| zebra stripes | ~~are neat~~ | $1 | -{: title="My table title"} - -As you can see, the numbering is added automatically. - -Isn't that cool? - -You can also refer to the [LiveLabs Markdown Cheatsheet](https://c4u04.objectstorage.us-ashburn-1.oci.customer-oci.com/p/EcTjWk2IuZPZeNnD_fYMcgUhdNDIDA6rt9gaFj_WZMiL7VvxPBNMY60837hu5hga/n/c4u04/b/livelabsfiles/o/labfiles/LiveLabs_MD_Cheat_Sheet.pdf) \ No newline at end of file diff --git a/ai-vector-image/variables/variables-in-another-file.json b/ai-vector-image/variables/variables-in-another-file.json deleted file mode 100644 index 2492b7b6b..000000000 --- a/ai-vector-image/variables/variables-in-another-file.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "var11": "Variable 1 value but yet different", - "var22": "Variable 2 value is different", - "random_name2": "LiveLabs rocks & rules!", - "name_of_database": "My-Database-Name-is-the-best", - "magic": "What is 2*2?", - "doc_link": "[more info](https://docs.oracle.com/en/engineered-systems/exadata-database-machine/)" - } \ No newline at end of file diff --git a/ai-vector-image/variables/variables.json b/ai-vector-image/variables/variables.json deleted file mode 100644 index 8c644daa3..000000000 --- a/ai-vector-image/variables/variables.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "var1": "Variable 1 value", - "var2": "Variable 2 value", - "random_name": "LiveLabs rocks!", - "number_of_ocpu_paid": "24", - "number_of_ocpu_always_free": "2" - } \ No newline at end of file diff --git a/ai-vector-image/variables/variables.md b/ai-vector-image/variables/variables.md deleted file mode 100644 index cb1df39fd..000000000 --- a/ai-vector-image/variables/variables.md +++ /dev/null @@ -1,68 +0,0 @@ -# Variables in LiveLabs - -## Introduction - -You can specify variables in another file and refer to them in your Markdown. - - -## Task 1: - -Add the following to your manifest.json in the top section: - -``` - "variables": ["../../variables/variables.json", - "../../variables/variables-in-another-file.json"], -``` - -## Task 2 - -Specify the variables in the .json file like this: - -*Example: variables.json* -``` -{ - "var1": "Variable 1 value", - "var2": "Variable 2 value", - "random_name": "LiveLabs rocks!", - "number_of_ocpu_paid": "24" - "number_of_ocpu_always_free": "2" - } - ``` - -You can also add multiple files that specify variables (see the example in Task 1). - - *Example: variables_in_another_file.json* -``` -{ - "var11": "Variable 1 value but yet different", - "var22": "Variable 2 value is different", - "random_name2": "LiveLabs rocks & rules!",`` - "name_of_database": "My-Database-Name-is-the-best", - "magic": "What is 2*2?" - } - ``` - -## Task 3 - -Now, you can refer to those variables using the following syntax (**Please note that you can see the syntax only in markdown**): - -[](var:var1) - -or - -[](var:magic) - - -### Examples - -(Check the markdown to see the syntax - the bold text is the value of the variable) - -- Do you know math? This is **[](var:magic)** - -- How many OCPUs do I need to run this service in my paid tenancy? You need **[](var:number_of_ocpu_paid)** - -- But what if am using 'Always free'? Then you need **[](var:number_of_ocpu_always_free)** - -- What is the best name for my database? It is **[](var:name_of_database)** - -- Here you can find more info: **[](var:doc_link)** diff --git a/ai-vector-image/workshops/sandbox/manifest.json b/ai-vector-image/workshops/sandbox/manifest.json index d47b477ca..936234b65 100644 --- a/ai-vector-image/workshops/sandbox/manifest.json +++ b/ai-vector-image/workshops/sandbox/manifest.json @@ -4,40 +4,31 @@ "variables": ["../../variables/variables.json", "../../variables/variables-in-another-file.json"], "tutorials": [ - { - "title": "Get Started", - "description": "Prerequisites for LiveLabs (Oracle-owned tenancies). The title of the lab and the Contents Menu title (the title above) match for Prerequisite lab. This lab is always first.", - "filename": "https://oracle-livelabs.github.io/common/labs/cloud-login/cloud-login-livelabs2.md" - }, { "title": "Introduction", "description": "The Introduction is always second for LiveLabs. The title and contents menu title match for the Introduction.", "filename": "../../introduction/introduction.md" }, { - "title": "Lab 1: Provision an Instance", - "description": "Labs that follow the introduction are numbered, starting with Lab 1", - "filename": "../../provision/provision.md" - }, - { - "title": "Lab 2: Setup the Environment", - "filename": "../../setup/setup.md" + "title": "Get Started", + "description": "Prerequisites for LiveLabs (Oracle-owned tenancies). The title of the lab and the Contents Menu title (the title above) match for Prerequisite lab. This lab is always first.", + "filename": "https://oracle-livelabs.github.io/common/labs/cloud-login/cloud-login-livelabs2.md" }, { - "title": "Lab 3: Load Data into an Instance", - "filename": "../../data-load/data-load.md" + "title": "Lab 1: Learning about Notebooks and Models", + "filename": "../../generate/generate.md" }, { - "title": "Lab 4: Query Data", - "filename": "../../query/query.md" + "title": "Lab 2: Create and Load Descriptions", + "filename": "../../load-desc/load-desc.md" }, { - "title": "Lab 6: Variables in LiveLabs", - "filename": "../../variables/variables.md" + "title": "Lab 3: Create and Load Vectors", + "filename": "../../load-vectors/load-vectors.md" }, { - "title": "Lab 5: Tables in LiveLabs", - "filename": "../../tables/tables.md" + "title": "Lab 4: Building an APEX Application", + "filename": "../../apex/apex.md" }, { "title": "Need Help?",