Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ _ = load_dotenv(find_dotenv())
|
|
| 27 |
|
| 28 |
|
| 29 |
# access token with permission to access the model and PRO subscription
|
| 30 |
-
|
| 31 |
#login(token=os.environ["HF_ACCESS_READ"])
|
| 32 |
|
| 33 |
OAI_API_KEY=os.getenv("OPENAI_API_KEY")
|
|
@@ -66,13 +66,6 @@ YOUTUBE_URL_2 = "https://www.youtube.com/watch?v=hdhZwyf24mE"
|
|
| 66 |
#nur bei ersten Anfrage splitten der Dokumente - um die Vektordatenbank entsprechend zu füllen
|
| 67 |
splittet = False
|
| 68 |
|
| 69 |
-
##############################################
|
| 70 |
-
# tokenizer for generating prompt
|
| 71 |
-
##############################################
|
| 72 |
-
print ("Tokenizer")
|
| 73 |
-
#tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-70b-chat-hf")
|
| 74 |
-
#tokenizer = AutoTokenizer.from_pretrained("TheBloke/Yi-34B-Chat-GGUF")
|
| 75 |
-
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
|
| 76 |
|
| 77 |
##############################################
|
| 78 |
# inference client
|
|
@@ -87,6 +80,15 @@ client = InferenceClient()
|
|
| 87 |
print("List of models ......................:")
|
| 88 |
print(client.list_deployed_models("text-generation-inference"))
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
#################################################
|
| 92 |
#################################################
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
# access token with permission to access the model and PRO subscription
|
| 30 |
+
HUGGINGFACEHUB_API_TOKEN = os.getenv("HF_ACCESS_READ")
|
| 31 |
#login(token=os.environ["HF_ACCESS_READ"])
|
| 32 |
|
| 33 |
OAI_API_KEY=os.getenv("OPENAI_API_KEY")
|
|
|
|
| 66 |
#nur bei ersten Anfrage splitten der Dokumente - um die Vektordatenbank entsprechend zu füllen
|
| 67 |
splittet = False
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
##############################################
|
| 71 |
# inference client
|
|
|
|
| 80 |
print("List of models ......................:")
|
| 81 |
print(client.list_deployed_models("text-generation-inference"))
|
| 82 |
|
| 83 |
+
##############################################
|
| 84 |
+
# tokenizer for generating prompt
|
| 85 |
+
##############################################
|
| 86 |
+
print ("Tokenizer")
|
| 87 |
+
#tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-70b-chat-hf")
|
| 88 |
+
#tokenizer = AutoTokenizer.from_pretrained("TheBloke/Yi-34B-Chat-GGUF")
|
| 89 |
+
#tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
|
| 90 |
+
tokenizer = AutoTokenizer.from_pretrained("bigcode/starcoder")
|
| 91 |
+
|
| 92 |
|
| 93 |
#################################################
|
| 94 |
#################################################
|