GithubHelp home page GithubHelp logo

wolfrang1711 / hackai_temp_agent Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 101 KB

The TemperatureX Web Application is a Temperature Alert Agent built using Fetch.AI's uAgent library that provides a simple interface for users to input their desired location and temperature range and then displays real-time temperature status updates on the webpage.

Python 100.00%

hackai_temp_agent's Introduction

TemperatureX

Project Description

The TemperatureX Web Application is a Temperature Alert Agent built using Fetch.AI's uAgent library that provides a simple interface for users to input their desired location and temperature range and then displays real-time temperature status updates on the webpage, i.e., sends alert/notification to the user when the current temperature in their chosen location goes below the minimum or above the maximum threshold they've set.

How to Run the Project

Step 1: Prerequisites

Before starting, you'll need the following:

Python (3.8+ is recommended)

Poetry (a packaging and dependency management tool for Python)

Step 2: Clone or download this repository to your local machine:

   git clone https://github.com/Wolfrang1711/hackAI_temp_agent.git

Step 3: Set up .env file

To run the demo, you need API key from:

WeatherAPI

Visit WeatherAPI.

Sign up or log in.

Go to Dashboards in the left hand column and click on Generate API

Once generated, copy the API key

Once you have the weather key, create a .env file in the hackAI_temp_agent/src directory.

   export WEATHER_API_KEY="{GIVE THE API KEY}"

Step 4: To use the environment variables from .env and install the project:

Open New Terminal,

   cd src
   .env
   poetry install

Step 5: Navigate to shell

   poetry shell

Step 6: Run the main script

To run the project and its agents:

   python main.py

You need to look for the following output in the logs:

Enter the location for temperature query: {Enter the location whose temperature updates you want to receive}

Enter the minimum acceptable temperature: {Enter the minimum threshold temperature}

Enter the maximum acceptable temperature: {Enter the maximum threshold temperature}

Once you hit enter, a request will be sent to the query agent every half an hour and you will be able to see your results in the console!

For example,

Enter the location for temperature query: Goa

Enter the minimum acceptable temperature: 30

Enter the maximum acceptable temperature: 50

The result you should be able to see is,

WARNING: [temperature_query]: Temperature Alert: It's Cold at 2023-10-10 20:28!! Current Temperature is 27.0°C

Special Considerations

The application uses the uagents library for agent-based communication. Ensure that you have this library properly installed and configured in your project.

hackai_temp_agent's People

Contributors

romalamishra avatar wolfrang1711 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.