Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
def cyberpunk_bot(user_input):
|
| 2 |
responses = {
|
| 3 |
"hello": "Hey there, choomba! Welcome to Night City. How can I help you today?",
|
|
@@ -9,3 +11,13 @@ def cyberpunk_bot(user_input):
|
|
| 9 |
|
| 10 |
user_input_lower = user_input.lower()
|
| 11 |
return responses.get(user_input_lower, responses["default"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
def cyberpunk_bot(user_input):
|
| 4 |
responses = {
|
| 5 |
"hello": "Hey there, choomba! Welcome to Night City. How can I help you today?",
|
|
|
|
| 11 |
|
| 12 |
user_input_lower = user_input.lower()
|
| 13 |
return responses.get(user_input_lower, responses["default"])
|
| 14 |
+
|
| 15 |
+
demo = gr.Interface(
|
| 16 |
+
fn=cyberpunk_bot,
|
| 17 |
+
inputs=gr.inputs.Textbox(lines=2, placeholder="Type your message here..."),
|
| 18 |
+
outputs="text",
|
| 19 |
+
title="Cyberpunk 2077 Chatbot",
|
| 20 |
+
description="Interact with V, your guide in Night City!"
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
demo.launch()
|