Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
"""
|
| 5 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
+
from torch import cuda, bfloat16
|
| 4 |
+
import torch
|
| 5 |
+
import transformers
|
| 6 |
+
from transformers import AutoTokenizer
|
| 7 |
+
from time import time
|
| 8 |
+
import chromadb
|
| 9 |
+
from chromadb.config import Settings
|
| 10 |
+
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
| 11 |
+
from langchain.embeddings import HuggingFaceEmbeddings
|
| 12 |
+
from langchain.chains import RetrievalQA
|
| 13 |
+
from langchain.vectorstores import Chroma
|
| 14 |
+
from langchain.document_loaders import PyPDFLoader
|
| 15 |
+
import requests
|
| 16 |
|
| 17 |
"""
|
| 18 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|