Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,12 @@ from langchain.chains import ConversationChain
|
|
5 |
from langchain.chains.conversation.memory import ConversationSummaryMemory
|
6 |
from transformers import pipeline
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
# Initialize the text classifier for guardrails
|
9 |
classifier = pipeline("text-classification", model="meta-llama/Prompt-Guard-86M")
|
10 |
|
|
|
5 |
from langchain.chains.conversation.memory import ConversationSummaryMemory
|
6 |
from transformers import pipeline
|
7 |
|
8 |
+
from huggingface_hub import login
|
9 |
+
|
10 |
+
# Add your Hugging Face token here
|
11 |
+
HUGGINGFACE_TOKEN = os.getenv("HF")
|
12 |
+
login(token=HUGGINGFACE_TOKEN)
|
13 |
+
|
14 |
# Initialize the text classifier for guardrails
|
15 |
classifier = pipeline("text-classification", model="meta-llama/Prompt-Guard-86M")
|
16 |
|