taufiqdp commited on
Commit
cd0d71a
1 Parent(s): 6489fa9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -18,13 +18,13 @@ defaults = {
18
 
19
  }
20
 
21
- def chat(Sentences):
22
  response = palm.generate_text(
23
  **defaults,
24
- prompt=f"""Correct this sentences and correct the grammar. Do not add the quotation marks on your correction sentences: '{Sentences}'"""
25
  )
26
  return response.result
27
 
28
  demo = gr.Interface(fn=chat, inputs=gr.Textbox(lines=10), outputs=gr.Textbox(lines=10), allow_flagging="never")
29
 
30
- demo.launch(debug=True)
 
18
 
19
  }
20
 
21
+ def chat(text):
22
  response = palm.generate_text(
23
  **defaults,
24
+ prompt=f"""Correct this sentences and correct the grammar. Do not add the quotation marks on your correction sentences: '{text}'"""
25
  )
26
  return response.result
27
 
28
  demo = gr.Interface(fn=chat, inputs=gr.Textbox(lines=10), outputs=gr.Textbox(lines=10), allow_flagging="never")
29
 
30
+ demo.launch()