Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,4 +3,14 @@ import langchain
|
|
3 |
import langchain_huggingface
|
4 |
from langchain_huggingface import HuggingFaceEndpoint,HuggingFacePipeline, ChatHuggingFace
|
5 |
from langchain_google_genai import GoogleGenerativeAI, ChatGoogleGenerativeAI
|
6 |
-
from langchain_core.messages import HumanMessage, SystemMessage, AIMessage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
import langchain_huggingface
|
4 |
from langchain_huggingface import HuggingFaceEndpoint,HuggingFacePipeline, ChatHuggingFace
|
5 |
from langchain_google_genai import GoogleGenerativeAI, ChatGoogleGenerativeAI
|
6 |
+
from langchain_core.messages import HumanMessage, SystemMessage, AIMessage
|
7 |
+
|
8 |
+
os.environ["HF_TOKEN"]=os.getenv('Ayush')
|
9 |
+
os.environ["HUGGINGFACEHUB_API_KEY"]=os.getenv('Ayush')
|
10 |
+
|
11 |
+
llama_model = HuggingFaceEndpoint(repo_id= "meta-llama/Llama-3.2-3B-Instruct",provider= "nebius",temperature=0.6, max_new_tokens=70,task="conversational")
|
12 |
+
model_d=ChatHuggingFace(llm =llama_model,repo_id= "meta-llama/Llama-3.2-3B-Instruct",provider= "nebius",temperature=0.6, max_new_tokens=70,task="conversational")
|
13 |
+
message = [SystemMessage(content = "Answer like you are a hardcore pc gamer"),
|
14 |
+
HumanMessage(content = "Give me name of top 10 pc games of all time with description")]
|
15 |
+
result = model_d.invoke(message)
|
16 |
+
print(result.content)
|