![]() ![]() Then, copy the file into the directory with cp kaggle.json ~/.kaggle/kaggle.json. kaggle (along with throwing an error because it can’t find a kaggle.json file inside the. You can do this by executing the command kaggle, which will create the hidden directory. Lastly, we need to instruct the kaggle command-line utility to use your kaggle.json file. If you don’t know how to do it, check the “Uploading files from your local file system“ section of this notebook. Next, you need to upload your kaggle.json file to your Colab instance. Once done, you should have a kaggle.json file. Here are the instructions to create the API key, it’s very easy. To use the kaggle command, we need to connect it to our Kaggle account through an API key. We’ll download our dataset using the kaggle command-line utility, which comes already installed on Google Colab. Later in this article, we’ll save our model checkpoints inside a purposely created drive/MyDrive/Models directory. You can then find your Google Drive data in the drive/MyDrive directory. tags : List of tags associated with the article.timestamp : The publication datetime of the article.url : The URL associated with the article.text : The text content of the article.For each article, you have the following features: I then uploaded it to Kaggle with the name 190k+ Medium Articles dataset so that everyone can use it, along with a public notebook with simple data exploration.Įach row in the data is a different article published on Medium. Since I couldn’t find a Medium articles dataset containing both articles textual contents and titles, I created one by myself by scraping the website and parsing web pages using the newspaper Python library. There are already available datasets with many newspaper articles, but for this tutorial I wanted to focus on the kind of articles that we usually find on Medium: less news, more guides. I usually look for datasets on Google Dataset Search or Kaggle. Build an interactive demo with Streamlit and deploy it to Hugging Face Spaces.Ĭhoosing a dataset for the Title Generation task.Upload the model on Hugging Face Hub for everyone to use.Fine-tune a pre-trained model for title generation on Colab, monitoring the chosen metric on the validation set using TensorBoard, and saving the model’s checkpoints on Google Drive (so that we can resume training in case Colab shuts down the connection).Find a suitable dataset containing articles textual contents and titles. ![]() This is what we are going to do in this article: To test them out, I decided to fine-tune a pre-trained model on a simple but not-so-popular task, which is the generation of candidate titles for articles starting from their textual content. However, when you deploy an application on Hugging Face Spaces that uses a machine learning model uploaded on the Hugging Face Hub, everyone can see that they are linked (i.e., that there is an interactive demo for that model). It provides free CPUs and it’s similar to the Streamlit Cloud. Hugging Face Spaces is a service where you can deploy your Streamlit or Gradio applications so that you can easily share them.I suggest having a look at Gradio as well, which is another popular Python library with similar goals. Moreover, you can deploy your Streamlit application to the Streamlit Cloud, which makes it easy to share your applications with other people and you get free CPUs to run your applications. Check out the Streamlit Gallery to learn what can be done with the library. Streamlit is a Python library that allows data scientists to easily create small interactive demos, so that other people can test their machine learning models or see their data analyses.I’ve been wanting to experiment with Streamlit and Hugging Face Spaces for a while now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |