Giter Club home page Giter Club logo

plotai's People

Contributors

aplonska avatar pedmatias avatar pplonski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

plotai's Issues

model_version="gpt-4"

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

An observation from PlotAI-GDP-demo.mp4

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.

GPT 4 official support

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 ?

HuggingFace Inference API support

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

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.