Spaces:
Runtime error
Runtime error
Changed to Llama 2 model
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
from langchain.llms import OpenAI
|
|
|
3 |
from langchain.prompts import PromptTemplate
|
4 |
from langchain import FewShotPromptTemplate
|
5 |
from langchain.prompts.example_selector import LengthBasedExampleSelector
|
@@ -8,7 +9,7 @@ from dotenv import load_dotenv
|
|
8 |
load_dotenv()
|
9 |
|
10 |
def getLLMResponse(query, age_option,tasktype_option):
|
11 |
-
llm =
|
12 |
|
13 |
if age_option == "Child":
|
14 |
examples = [
|
|
|
1 |
import streamlit as st
|
2 |
from langchain.llms import OpenAI
|
3 |
+
from langchain.llms import LlamaCpp
|
4 |
from langchain.prompts import PromptTemplate
|
5 |
from langchain import FewShotPromptTemplate
|
6 |
from langchain.prompts.example_selector import LengthBasedExampleSelector
|
|
|
9 |
load_dotenv()
|
10 |
|
11 |
def getLLMResponse(query, age_option,tasktype_option):
|
12 |
+
llm = LlamaCpp(temperature=.9, model="llama-2-7b-chat.ggmlv3.q2_K.bin")
|
13 |
|
14 |
if age_option == "Child":
|
15 |
examples = [
|