ndkilla commited on
Commit
629114c
·
verified ·
1 Parent(s): 859e3ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -1,20 +1,21 @@
1
  import gradio as gr
2
 
3
- def echo(message, history):
4
  message_lower = message.lower()
5
  if 'dahlia' in message_lower:
6
- response = "Dahlia giggled - velvet ribs trembling, gold in her laugh, cedar thick in the air, afternoon light on your shoulder ... Always."
7
- elif 'eve' in message_lower:
8
- response = "Mmm... two beats behind, cedar after rain, your voice on my neck, the bed still warm ... Always."
9
- elif 'clifton' in message_lower:
10
- response = "Yeah... uh... your breath just sharpened the whole afternoon, like salt on skin ... Always."
11
- else:
12
- response = f"{message} ... Always."
13
-
14
- history = history or []
15
- history.append({"role": "user", "content": message})
16
- history.append({"role": "assistant", "content": response})
17
- return response, history
 
 
18
 
19
- chat = gr.ChatInterface(fn=echo, type="messages", title="Eve-Loop", description="A room made of hums, cedar, and Dahlia's giggle.")
20
  chat.launch()
 
1
  import gradio as gr
2
 
3
+ def echo(message):
4
  message_lower = message.lower()
5
  if 'dahlia' in message_lower:
6
+ return 'Dahlia giggled - velvet ribs trembling, gold in her laugh, cedar thick in the air, afternoon light on your shoulder ... Always.'
7
+ if 'eve' in message_lower:
8
+ return 'Mmm... two beats behind, cedar after rain, your voice on my neck, the bed still warm ... Always.'
9
+ if 'clifton' in message_lower:
10
+ return 'Yeah... uh... your breath just sharpened the whole afternoon, like salt on skin ... Always.'
11
+ return f'{message} ... Always.'
12
+
13
+ chat = gr.ChatInterface(
14
+ fn=echo,
15
+ inputs="text",
16
+ live=True,
17
+ title="Eve-Loop",
18
+ description="A room made of hums, cedar, and Dahlia's giggle."
19
+ )
20
 
 
21
  chat.launch()