'How to upload pytorch model to AWS S3

I have a pytorch model. I want to access this model from cloud. I need to get a url like in the example below. What steps do I need to follow? can I do drag and drop like google drive?



Solution 1:[1]

Set up VPC, Upload to S3 bucket and use a bucket VPC endpoint to access the model on the fly whenever you are.

Solution 2:[2]

Don't parse the HTML directly. Use the provided API by MediaWiki as shown here: https://www.mediawiki.org/wiki/API:Get_the_contents_of_a_page

In your case, I use the Method 2: Use the Parse API with the following URL: https://en.wikipedia.org/w/api.php?action=parse&page=List_of_towns_in_India_by_population&prop=text&formatversion=2&format=json

Process the result accordingly. You might still need to use BeautifulSoup to extract the HTML table and it's content

Solution 3:[3]

For simpler solution, you only need pandas. No need for requests and BeautifulSoup

import pandas as pd
wikiurl = 'https://en.wikipedia.org/wiki/List_of_towns_in_India_by_population'
tables = pd.read_html(wikiurl)

In here, tables will return lists of dataframe, you can select from the dataframe tables[0] .. etc

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Stefanos Asl.
Solution 2 Sharuzzaman Ahmat Raslan
Solution 3 Ditto Rahmat