jozzy commited on
Commit
1bbdf9c
·
1 Parent(s): 2cfc355

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -46,16 +46,17 @@ def textGPT(text):
46
  return chats
47
 
48
 
49
- def update(name):
50
- return f"Welcome to Gradio, {name}!"
 
51
 
52
 
53
  with gr.Blocks() as test:
54
- with gr.Row():
55
- inp = gr.Textbox(placeholder="What is your name?")
56
- out = gr.Textbox()
57
- btn = gr.Button("Clear")
58
- btn.click(fn=update, inputs=inp, outputs=out)
59
 
60
 
61
  text = gr.Interface(fn=textGPT, inputs="text", outputs="text")
 
46
  return chats
47
 
48
 
49
+ def clear():
50
+ messages = [{"role": "system", "content": 'You are a helpful technology assistant.'}]
51
+ return
52
 
53
 
54
  with gr.Blocks() as test:
55
+ #with gr.Row():
56
+ # inp = gr.Textbox(placeholder="What is your name?")
57
+ # out = gr.Textbox()
58
+ btn = gr.Button("clear history")
59
+ btn.click(fn=clear)
60
 
61
 
62
  text = gr.Interface(fn=textGPT, inputs="text", outputs="text")