GithubHelp home page GithubHelp logo

mparje / text-analysis-with-openai-gpt-3.5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ddtdanilo/text-analysis-with-openai-gpt-3.5

0.0 0.0 0.0 12 KB

Text Analysis with OpenAI GPT-3.5 is a Python script that uses the power of the OpenAI GPT-3.5 language model to analyze text and answer questions about its content. The script takes a text or PDF file as input and allows users to ask questions about the text's plot, characters, themes, and more.

License: MIT License

Python 100.00%

text-analysis-with-openai-gpt-3.5's Introduction

Text Analysis with OpenAI GPT-3.5

This repository contains a Python script for analyzing text using the OpenAI gpt-3.5-turbo language model. The script takes a text or PDF file as input, and allows users to ask questions about the content. If you need documentation from OpenAI of the model, you can find it here.

Installation

  1. Clone the repository:
git clone https://github.com/ddtdanilo/Text-Analysis-with-OpenAI-GPT-3.5.git
  1. Install the required packages:
pip install openai PyPDF2 python-dotenv
  1. Set up your OpenAI API key by following the instructions in the OpenAI documentation.

Usage

  1. Load a text by running the script with the file paths as arguments:
python scripts/text_analysis.py examples/example_prompt.txt examples/example_response.txt examples/example-text_to_analyze.txt
  1. Ask questions about the text by typing them in at the prompt. The script will generate answers using the OpenAI GPT-3 language model.

  2. To exit the script, type "exit" at the prompt.

Available Models

The script currently uses the "gpt-3.5-turbo", which is the most powerful.

Contributions

Contributions to this project are welcome. If you find any bugs or have suggestions for new features, please create an issue or submit a pull request.

License

This project is licensed under the MIT License.

text-analysis-with-openai-gpt-3.5's People

Contributors

ddtdanilo 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.