Coder Social home page Coder Social logo

kurubarana / hashgen-ai Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 293 KB

HashGen AI is a Flutter package that leverages OpenAI's API to generate relevant hashtags based on the provided content. This package simplifies the process of adding impactful hashtags to your content, enhancing its discoverability.

Home Page: https://pub.dev/packages/hashgen_ai

License: MIT License

Kotlin 0.22% Swift 3.18% Objective-C 0.07% Dart 11.17% CMake 35.69% C++ 43.67% C 2.62% HTML 3.38%
ai content-discovery dart flutter flutter-package hashtags machine-learning openai

hashgen-ai's Introduction

HashGen AI

Pub Version License

hashgen_ai is a Flutter package that utilizes OpenAI's API to generate relevant hashtags based on the provided content and the desired number of hashtags. This package supports Android, iOS, web, and macOS platforms.

Features

  • Generate hashtags based on the content provided
  • Specify the number of hashtags to generate
  • Easy integration with OpenAI API
  • Supports multiple platforms: Android, iOS, web, and macOS

Getting started

Prerequisites

  1. Flutter SDK: Ensure you have Flutter installed. You can download it from flutter.dev.
  2. OpenAI API Key: Sign up for an API key from OpenAI.

Installation

Add hashgen_ai to your pubspec.yaml:

dependencies:
  hashgen_ai: ^1.0.1

Then, run flutter pub get to install the package.

Usage

Basic Example

import 'package:flutter/material.dart';
import 'package:hashgen_ai/hashgen_ai.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HashGenAIExample(),
    );
  }
}

class HashGenAIExample extends StatefulWidget {
  @override
  _HashGenAIExampleState createState() => _HashGenAIExampleState();
}

class _HashGenAIExampleState extends State<HashGenAIExample> {
  final HashGenAI hashGenAI = HashGenAI('YOUR_OPENAI_API_KEY');
  List<String> hashtags = [];

  void _generateHashtags() async {
    final generatedHashtags = await hashGenAI.generateHashtags(
      'Flutter is an open-source UI software development toolkit created by Google.',
      5,
    );
    setState(() {
      hashtags = generatedHashtags;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('HashGen AI Example'),
      ),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: Column(
          children: [
            ElevatedButton(
              onPressed: _generateHashtags,
              child: Text('Generate Hashtags'),
            ),
            SizedBox(height: 16.0),
            ...hashtags.map((hashtag) => Text(hashtag)).toList(),
          ],
        ),
      ),
    );
  }
}

Replace 'YOUR_OPENAI_API_KEY' with your actual OpenAI API key.

Additional information

For more information on how to use the hashgen_ai package, visit the documentation.

Contributing

We welcome contributions to the hashgen_ai package. Before you start, please check the CONTRIBUTING.md for guidelines on how to contribute and the issues.md for known issues and how to report new ones. If you have an idea for a new feature or have found a bug, please open an issue on our GitHub repository.

Issues

If you encounter any problems or have questions about hashgen_ai, please feel free to open an issue on our GitHub repository.

Authors

  • Kurubaran Anandhan
  • Hemalatha Gurunathan

License

This project is licensed under the MIT License - see the LICENSE file for details.

hashgen-ai's People

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.