Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
import os
|
2 |
-
import
|
3 |
import gradio as gr
|
4 |
-
import spaces
|
5 |
from huggingface_hub import InferenceClient
|
6 |
from langchain.embeddings import HuggingFaceInstructEmbeddings
|
7 |
from langchain.vectorstores import Chroma
|
8 |
from langchain.prompts import PromptTemplate
|
9 |
from langchain.chains import RetrievalQA
|
10 |
from langchain.llms import HuggingFacePipeline
|
|
|
|
|
11 |
from transformers import AutoTokenizer, TextStreamer, pipeline, BitsAndBytesConfig, AutoModelForCausalLM
|
12 |
|
13 |
TORCH_VERSION = torch.__version__
|
|
|
1 |
import os
|
2 |
+
import spaces # Move this to the top
|
3 |
import gradio as gr
|
|
|
4 |
from huggingface_hub import InferenceClient
|
5 |
from langchain.embeddings import HuggingFaceInstructEmbeddings
|
6 |
from langchain.vectorstores import Chroma
|
7 |
from langchain.prompts import PromptTemplate
|
8 |
from langchain.chains import RetrievalQA
|
9 |
from langchain.llms import HuggingFacePipeline
|
10 |
+
|
11 |
+
import torch
|
12 |
from transformers import AutoTokenizer, TextStreamer, pipeline, BitsAndBytesConfig, AutoModelForCausalLM
|
13 |
|
14 |
TORCH_VERSION = torch.__version__
|