Shanat commited on
Commit
781f127
1 Parent(s): 9ccf011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -25
app.py CHANGED
@@ -1,26 +1,26 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- Created on Sat Oct 5 16:41:22 2024
4
-
5
- @author: Admin
6
- """
7
-
8
- import gradio as gr
9
- from transformers import pipeline
10
-
11
-
12
- #chatbot = pipeline(model="NCSOFT/Llama-3-OffsetBias-8B")
13
- chatbot = pipeline(model="meta-llama/Llama-3.2-1B-Instruct",device="cuda")
14
-
15
- message_list = []
16
- response_list = []
17
-
18
-
19
- def vanilla_chatbot(message, history):
20
- conversation = chatbot(message)
21
-
22
- return conversation[0]['generated_text']
23
-
24
- demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Vanilla Chatbot", description="Enter text to start chatting.")
25
-
26
  demo_chatbot.launch()
 
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ Created on Sat Oct 5 16:41:22 2024
4
+
5
+ @author: Admin
6
+ """
7
+
8
+ import gradio as gr
9
+ from transformers import pipeline
10
+
11
+
12
+ #chatbot = pipeline(model="NCSOFT/Llama-3-OffsetBias-8B")
13
+ chatbot = pipeline(model="TheBloke/Mistral-7B-Instruct-v0.2-GPTQ",device="cuda")
14
+
15
+ message_list = []
16
+ response_list = []
17
+
18
+
19
+ def vanilla_chatbot(message, history):
20
+ conversation = chatbot(message)
21
+
22
+ return conversation[0]['generated_text']
23
+
24
+ demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Vanilla Chatbot", description="Enter text to start chatting.")
25
+
26
  demo_chatbot.launch()