KvrParaskevi
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -61,9 +61,9 @@ def chain():
|
|
61 |
return llm_chain
|
62 |
|
63 |
@spaces.GPU
|
64 |
-
def chat_output(
|
65 |
llm_chaim = chain()
|
66 |
-
result = llm_chaim.predict(input =
|
67 |
return result
|
68 |
|
69 |
with gr.Blocks() as demo:
|
@@ -72,10 +72,7 @@ with gr.Blocks() as demo:
|
|
72 |
textbox_component = gr.Textbox(placeholder="Can I help you to book a hotel?", container=False, label = "input", scale=7)
|
73 |
|
74 |
demo.chatbot_interface = gr.ChatInterface(
|
75 |
-
fn=chat_output,
|
76 |
-
inputs=[
|
77 |
-
textbox_component
|
78 |
-
],
|
79 |
examples = ["Hello I would like to book a hotel room.", "Hello I want to stay in Nuremberg in 30th of May." ],
|
80 |
#outputs=chatbot_component,
|
81 |
title = "Hotel Booking Assistant Chat 🤗",
|
|
|
61 |
return llm_chain
|
62 |
|
63 |
@spaces.GPU
|
64 |
+
def chat_output(message, history):
|
65 |
llm_chaim = chain()
|
66 |
+
result = llm_chaim.predict(input = message)
|
67 |
return result
|
68 |
|
69 |
with gr.Blocks() as demo:
|
|
|
72 |
textbox_component = gr.Textbox(placeholder="Can I help you to book a hotel?", container=False, label = "input", scale=7)
|
73 |
|
74 |
demo.chatbot_interface = gr.ChatInterface(
|
75 |
+
fn=chat_output,
|
|
|
|
|
|
|
76 |
examples = ["Hello I would like to book a hotel room.", "Hello I want to stay in Nuremberg in 30th of May." ],
|
77 |
#outputs=chatbot_component,
|
78 |
title = "Hotel Booking Assistant Chat 🤗",
|