Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,11 @@ from langchain.llms import CTransformers
|
|
4 |
import gradio as gr
|
5 |
## Function To get response from LLAma 2 model
|
6 |
|
7 |
-
def getLLamaresponse(
|
|
|
|
|
|
|
|
|
8 |
|
9 |
### LLama2 model
|
10 |
llm=CTransformers(model='TheBloke/OpenHermes-2.5-Mistral-7B-GGUF',
|
@@ -35,7 +39,7 @@ with gr.Blocks() as demo:
|
|
35 |
chatbot = gr.Chatbot()
|
36 |
message = gr.Textbox(label="Enter your message to Barry", placeholder="Type here...", lines=2)
|
37 |
send_message = gr.Button("Submit")
|
38 |
-
send_message.click(
|
39 |
save_chatlog = gr.Button("Save Chatlog")
|
40 |
#send_message.click(SaveChatlog, inputs=[message], outputs=[chatbot])
|
41 |
|
|
|
4 |
import gradio as gr
|
5 |
## Function To get response from LLAma 2 model
|
6 |
|
7 |
+
def getLLamaresponse(message):
|
8 |
+
|
9 |
+
input_text = "home decoration"
|
10 |
+
no_words = "100"
|
11 |
+
blog_style = "lifestyle"
|
12 |
|
13 |
### LLama2 model
|
14 |
llm=CTransformers(model='TheBloke/OpenHermes-2.5-Mistral-7B-GGUF',
|
|
|
39 |
chatbot = gr.Chatbot()
|
40 |
message = gr.Textbox(label="Enter your message to Barry", placeholder="Type here...", lines=2)
|
41 |
send_message = gr.Button("Submit")
|
42 |
+
send_message.click(getLLamaresponse, inputs=[message], outputs=[chatbot])
|
43 |
save_chatlog = gr.Button("Save Chatlog")
|
44 |
#send_message.click(SaveChatlog, inputs=[message], outputs=[chatbot])
|
45 |
|