Skip to content

Ollma not working #6

@nv-zhangineer

Description

@nv-zhangineer

Hello

I tried the following code with Ollama, but not getting any information back. the llm instance returned empty.

Any ideas ?

import streamlit as st 
from langchain_ollama.llms import OllamaLLM
import pandas as pd
from pandasai import SmartDataframe
llm= OllamaLLM(model='llama3:8b', temperature=0.1, base_url="http://localhost:11434")
print (llm)

uploader_file = fr"C:\temp\test.csv"
data = pd.read_csv(uploader_file)
df = SmartDataframe(data, config={"llm": llm})
response = df.chat("what's the number of rows in the dataset?")
if response:
    print (response)
else:
    print ("No response")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions