Corianas commited on
Commit
2b9bd6d
1 Parent(s): 359fdc3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -106,14 +106,6 @@ def gen(input):
106
  out = remove_caseifer(generated_text)
107
  return input + out
108
 
109
- md = """This is some code:
110
-
111
- hello
112
-
113
- ```py
114
- def fn(x, y, z):
115
- print(x, y, z)
116
- """
117
  chat_history = []
118
  with gr.Blocks() as demo:
119
  chatbot = gr.Chatbot()
@@ -121,8 +113,9 @@ with gr.Blocks() as demo:
121
  clear = gr.Button("Clear")
122
 
123
  def respond(message, chat_history):
124
- chat_history.append((message, md))
125
- bot_message = gen("Hello")
 
126
  time.sleep(1)
127
  return "", chat_history
128
 
 
106
  out = remove_caseifer(generated_text)
107
  return input + out
108
 
 
 
 
 
 
 
 
 
109
  chat_history = []
110
  with gr.Blocks() as demo:
111
  chatbot = gr.Chatbot()
 
113
  clear = gr.Button("Clear")
114
 
115
  def respond(message, chat_history):
116
+ chat_history.append(message)
117
+ bot_message = gen(str(chat_history))
118
+ chat_history.append(bot_message)
119
  time.sleep(1)
120
  return "", chat_history
121