Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import os
|
2 |
-
from
|
3 |
from huggingface_hub import InferenceClient
|
4 |
import langchain
|
5 |
from langchain import HuggingFaceHub
|
@@ -8,6 +8,9 @@ import gradio as gr
|
|
8 |
|
9 |
HUGGINGFACEHUB_API_TOKEN = os.environ["HUGGINGFACEHUB_API_TOKEN"]
|
10 |
|
|
|
|
|
|
|
11 |
model="bigscience/bloom"
|
12 |
llm = HuggingFaceHub(repo_id=model ,
|
13 |
model_kwargs={"max_length":512,"do_sample":True,
|
|
|
1 |
import os
|
2 |
+
from langchain.embeddings import HuggingFaceEmbeddings
|
3 |
from huggingface_hub import InferenceClient
|
4 |
import langchain
|
5 |
from langchain import HuggingFaceHub
|
|
|
8 |
|
9 |
HUGGINGFACEHUB_API_TOKEN = os.environ["HUGGINGFACEHUB_API_TOKEN"]
|
10 |
|
11 |
+
embeddings = HuggingFaceEmbeddings(
|
12 |
+
model_name="sentence-transformers/all-MiniLM-L6-v2"
|
13 |
+
)
|
14 |
model="bigscience/bloom"
|
15 |
llm = HuggingFaceHub(repo_id=model ,
|
16 |
model_kwargs={"max_length":512,"do_sample":True,
|