Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build a Stock Price Prediction App using Strapi, Streamlit and HuggingFace Models #1370

Closed
1 task done
adejumoridwan opened this issue Apr 23, 2024 · 5 comments
Closed
1 task done
Assignees
Labels
In progress Tutorial being created Intermediate Expertise

Comments

@adejumoridwan
Copy link

What is your article idea?

This tutorial article covers the key aspects of building a stock price prediction app using Strapi as the backend, Streamlit for the frontend, and HuggingFace Models for the machine learning component.

  1. Introduction

    • Brief overview of stock price prediction and its importance
    • Introduce the technologies used: Strapi, Streamlit, and HuggingFace Models
  2. Setting up the Development Environment

    • Installing required software and dependencies
      • Python and pip
      • Strapi
      • Streamlit
      • HuggingFace Transformers library
  3. Building the Backend with Strapi

    • Introduction to Strapi (a headless CMS)
    • Creating a Strapi project
    • Defining the data model (Content Types)
      • User data (if required)
    • Setting up APIs and endpoints
      • Fetching stock data from a third-party API (e.g., Alpha Vantage, Yahoo Finance)
    • Caching or storing fetched stock data (if needed)
  4. Implementing the Machine Learning Model

    • Introduction to HuggingFace Transformers
    • Choosing a suitable pre-trained model for stock price prediction
    • Fine-tuning the model with historical stock data
    • Saving the fine-tuned model
  5. Building the Frontend with Streamlit

    • Introduction to Streamlit (a Python web app framework)
    • Creating a Streamlit app
    • Designing the user interface
      • Stock selection
      • Date range selection
      • Model output display
    • Integrating the fine-tuned HuggingFace model
    • Fetching stock data from the Strapi backend
    • Preprocessing the data
    • Making predictions using the fine-tuned model
    • Displaying the predictions in the Streamlit app
  6. Deployment and Hosting

    • Hosting the Strapi backend
      • Creating an account on Strapi Cloud
      • Deploying the Strapi project to Strapi Cloud
      • Configuring the backend for production
    • Deploying the Streamlit app
      • StreamlitCloud
      • Configuring the app for production
  7. Testing and Evaluation

    • Testing the application with various scenarios
    • Evaluating the model's performance
    • Potential improvements and future work
  8. Conclusion

    • Recap of the project and its components
    • Potential use cases and applications
    • Encouraging further exploration and learning

What are the objectives of your article?

The key things the reader will learn are:

  • How to use Strapi to fetch data from an external API
  • How to use an ML model with Strapi
  • How to integrate Strapi with Streamlit
  • How to deploy on Strapi and Streamlit Cloud.

What is your expertise as a developer or writer?

Advance

What type of post is this?

Tutorial

Terms & Conditions

  • I have read the Write for the Community program guidelines.
@Theodore-Kelechukwu-Onyejiaku
Copy link
Collaborator

Hi @adejumoridwan , great outline. 🚀

Could you please tell me about the end result of your application? And then how to incorporate Strapi, Streamlit and HuggingFace. And would you also be willing to share a working Github repo in this tutorial?

@adejumoridwan
Copy link
Author

Hi @adejumoridwan , great outline. 🚀

Could you please tell me about the end result of your application? And then how to incorporate Strapi, Streamlit and HuggingFace. And would you also be willing to share a working Github repo in this tutorial?

The result is a user-friendly application that empowers users to input a stock type and date with Streamlit and receive an accurate prediction of its value based on the HuggingFace Model. This valuable feature is further enhanced by seamlessly saving the predicted value in Strapi as a historical record, enabling users to track and analyze their investment decisions over time. Additionally, I will share the GitHub repository for this tutorial.

@Theodore-Kelechukwu-Onyejiaku
Copy link
Collaborator

Hi @adejumoridwan ,

Thanks for the clarification. This looks good. Please proceed.

@adejumoridwan
Copy link
Author

adejumoridwan commented May 5, 2024

Hi,

I would like to close my current topic, as I have been unable to secure a model for stock prediction on HuggingFace. Instead, I would like to propose a new project that I am already working on.

The new project involves building a language Translation application using Streamlit, Strapi, and Hugging Face. This application will enable users to review their history of translated texts, which will be stored on the Strapi backend. Text will be translated using the Facebook language model on Hugging Face, and users can interact with the application using the UI built with streamlit.

@Theodore-Kelechukwu-Onyejiaku
Copy link
Collaborator

Hi @adejumoridwan ,

Sad to hear you are closing this one. Please do well to propose your article idea on another issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In progress Tutorial being created Intermediate Expertise
Projects
None yet
Development

No branches or pull requests

2 participants