AleenDG commited on
Commit
6b4d656
·
verified ·
1 Parent(s): d0fc699

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -12,6 +12,11 @@ from langchain.text_splitter import CharacterTextSplitter
12
  import os
13
 
14
  def process_input(urls, question):
 
 
 
 
 
15
  os.environ['HUGGINGFACEHUB_API_TOKEN'] = 'HUGGINGFACEHUB_API_TOKEN'
16
 
17
  repo_id = "mistralai/Mistral-7B-Instruct-v0.2"
 
12
  import os
13
 
14
  def process_input(urls, question):
15
+ # get a token: https://huggingface.co/docs/api-inference/quicktour#get-your-api-token
16
+
17
+ from getpass import getpass
18
+
19
+ HUGGINGFACEHUB_API_TOKEN = getpass()
20
  os.environ['HUGGINGFACEHUB_API_TOKEN'] = 'HUGGINGFACEHUB_API_TOKEN'
21
 
22
  repo_id = "mistralai/Mistral-7B-Instruct-v0.2"