Spaces:
Running
Running
amitpandey8
commited on
Commit
•
d6cc604
1
Parent(s):
1bd625c
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
import streamlit as st
|
2 |
-
from transformers import AutoModelForCausalLM
|
3 |
import torch
|
4 |
-
from mistral_common.tokens.tokenizers.mistral import MistralTokenizer
|
5 |
|
6 |
# Load the model and tokenizer
|
7 |
model_name = "GRMenon/mental-health-mistral-7b-instructv0.2-finetuned-V2"
|
8 |
-
tokenizer =
|
9 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
10 |
|
11 |
def get_bot_response(user_input):
|
@@ -36,4 +35,4 @@ def main():
|
|
36 |
st.write(f"Chatbot: {bot_response}")
|
37 |
|
38 |
if __name__ == "__main__":
|
39 |
-
main()
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
import torch
|
|
|
4 |
|
5 |
# Load the model and tokenizer
|
6 |
model_name = "GRMenon/mental-health-mistral-7b-instructv0.2-finetuned-V2"
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
9 |
|
10 |
def get_bot_response(user_input):
|
|
|
35 |
st.write(f"Chatbot: {bot_response}")
|
36 |
|
37 |
if __name__ == "__main__":
|
38 |
+
main()
|