Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,10 @@ from langchain.chains import LLMChain
|
|
3 |
from langchain_core.prompts import PromptTemplate
|
4 |
from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
|
5 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline,BitsAndBytesConfig
|
|
|
|
|
|
|
|
|
6 |
# quants = BitsAndBytesConfig(load_in_4bit=True)
|
7 |
|
8 |
template = ''' You are an expert Blog generator , Given the Topic , the intended audience and the maximum number of words ,
|
|
|
3 |
from langchain_core.prompts import PromptTemplate
|
4 |
from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
|
5 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline,BitsAndBytesConfig
|
6 |
+
import os
|
7 |
+
|
8 |
+
|
9 |
+
HF_TOKEN = os.environ["HF_TOKEN"]
|
10 |
# quants = BitsAndBytesConfig(load_in_4bit=True)
|
11 |
|
12 |
template = ''' You are an expert Blog generator , Given the Topic , the intended audience and the maximum number of words ,
|