mljar / plotai Goto Github PK
View Code? Open in Web Editor NEWPlotAI - Your Ultimate Plotting Assistant! ๐๐ค Use ChatGPT-3.5 to create plots in Python and Matplotlib directly in your Python script or notebook.
License: Apache License 2.0
PlotAI - Your Ultimate Plotting Assistant! ๐๐ค Use ChatGPT-3.5 to create plots in Python and Matplotlib directly in your Python script or notebook.
License: Apache License 2.0
If this library has the azure OpenAI model support using Azure API key then it would be great.
Hi,
First of all, congratulations on making such a helpful library.
Applications relying on OpenAI API keys are a bit restricted for researchers like me who have no access to the API (yet). Is it possible to extend the support to "HuggingFace (HF) Inference API" or another similar API? HF offers free API for a number of LLMs hosted by themselves.
Here is an example:
import requests
API_URL = "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.2"
headers = {"Authorization": f"Bearer {hf_token}"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
prompt = """df = pd.read_csv("data.csv")
# Plot y v/s x
"""
output = query({
"inputs": prompt,
})
print(output[0]['generated_text'])
Output:
df = pd.read_csv("data.csv")
# Plot y v/s x
df.plot(x="x", y="y")
plt.show()
# Plot y v/s x with fitting line
plt.scatter(df['x'], df['y'])
plt.plot(df['x'], np.poly1d(np.polyfit(df['x'], df['y'], degree=1))(df['x']), color='r')
plt.show()
# Linear Reg
Hi,
I am trying to set model version to gpt-4 as you suggested in the README file but I am getting the following error:
TypeError Traceback (most recent call last)
Cell In[4], line 6
3 df = pd.DataFrame({"x":[1,2,3], "y": [4,5,6]})
4 ## create a plot
----> 6 plot = PlotAI(df,model_version="gpt-4")
8 plot.make("scatter plot")
TypeError: PlotAI.init() got multiple values for argument 'model_version'
Initially when i tried with the default version , i got the following error:
...
178 """
--> 179 raise TypeError(f'Object of type {o.class.name} '
180 f'is not JSON serializable')
TypeError: Object of type DataFrame is not JSON serializable
Any suggestions how to fix the above errors? Thanks
Hi, I got an error says "TypeError: Object of type DataFrame is not JSON serializable" when I tried an example from this GitHub
import pandas as pd
from plotai import PlotAI
# create some data
df = pd.DataFrame({"x":[1,2,3], "y": [4,5,6]})
# do a plot
plot = PlotAI(df)
plot.make("scatter plot")
Any suggestion how to fix this?
Hello, i am trying to use plotai with a GPT4 key, but after several ways i have not been succesful using chat2plot with GPT4. Does caht2plot have official support to GPT 4 ? You guys can provide a implementation example with GPT4 if it's possible ?
The initial prompt was: "scatter plot gdp vs happiness", meaning you requested a graph of y=gdp vs x=happiness, but the make
function yielded a graph of y=happiness vs x=gdp with the wrong title.
I would call that a bug.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.