Skip to content

Test task. The script should run reviews of an imaginary application through OpenAI API and rate them on a scale of 1-10 based on the tone of the review.

Notifications You must be signed in to change notification settings

RogerRabbit32/Python---OpenAI_API_script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python - OpenAI API script

The following script opens a CSV file, runs reviews of the imaginary application taken from it through OpenAI API, which rates them on a scale of 1-10 based on the tone of the review. The reviews are then being sorted based on the given rate and saved as a separate CSV file into the same directory.

To run the script on a local machine, one should:

  • Download the code archive
  • Open the code directory with an appropriate IDE
  • Install the required dependencies with pip install -r requirements.txt command
  • Implement an environmental variable that will store your OpenAI API key with the name "OPENAI_API_KEY"

The sample input file is presented within the code directory and is called 'Reviews.csv', however one could replace that file or data within the file with one of their own, preserving the file structure and format.

About

Test task. The script should run reviews of an imaginary application through OpenAI API and rate them on a scale of 1-10 based on the tone of the review.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages