Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,9 @@ class BasicAgent:
|
|
26 |
|
27 |
os.environ["HUGGINGFACEHUB_API_TOKEN"] = "hf_abcdefghijklmnopqrstuvwxyz"
|
28 |
login(api_token)
|
29 |
-
|
|
|
|
|
30 |
self.model = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1")
|
31 |
self.tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1") # Initialize tokenizer
|
32 |
SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question. Report your thoughts, and
|
|
|
26 |
|
27 |
os.environ["HUGGINGFACEHUB_API_TOKEN"] = "hf_abcdefghijklmnopqrstuvwxyz"
|
28 |
login(api_token)
|
29 |
+
password = os.environ.get(api_token)
|
30 |
+
if password is None:
|
31 |
+
password = input('Please enter your password: ')
|
32 |
self.model = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1")
|
33 |
self.tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1") # Initialize tokenizer
|
34 |
SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question. Report your thoughts, and
|