From the course: Advanced Python Projects: Build AI Applications
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Challenge: Complete the backend code for file upload - Python Tutorial
From the course: Advanced Python Projects: Build AI Applications
Challenge: Complete the backend code for file upload
(upbeat electronic music) - [Person] It's time for a challenge now. Use the knowledge that you've gained in the previous lessons and complete this coding lesson. We'd like for you to use the code that's within the "Begin" folder labeled as "CH_3a_challenge." The libraries needed to complete this challenge have been already populated for you. Go ahead and initialize the FastAPI app. The libraries necessary for you to complete this challenge have already been populated for you. In this challenge, please go ahead and initialize the FastAPI app, set up the AWS A3 session using your own AWS access key ID and secret access key. Install MongoDB in code-space and start the database. Update the S3 bucket and S3 bucket path based on what you've defined in your AWS environment. Once you've done that, go ahead and create the upload endpoint. Next, extract the file name from the uploaded file, and save the file temporarily to a local file system, then get the file size and get the upload…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Setting up MongoDB4m 24s
-
(Locked)
Generate chat responses using GPT-3.5 and Langchain2m 46s
-
(Locked)
Load conversation history for a given session ID1m 16s
-
(Locked)
Create new sessions and add chat history to existing sessions1m 11s
-
(Locked)
Setup FastAPI app, CORS, S3 session, and obtain a chat response3m 43s
-
(Locked)
Upload files to Amazon S3 storage bucket2m 39s
-
(Locked)
Deploy and run the chatbot4m 2s
-
(Locked)
Challenge: Complete the backend code for file upload2m 13s
-
(Locked)
Solution: Complete the backend code for file upload9m 52s
-
(Locked)
-
-