decodemai commited on
Commit
88543cb
1 Parent(s): 22fcc8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -44,11 +44,10 @@ def query(text):
44
  return json.loads(response.content.decode("utf-8"))[0]['generated_text']
45
 
46
 
47
- iface = gr.Interface(
48
- fn=query,
49
- inputs='text',
50
- outputs='text',
51
- examples=[["cake shop"]]
52
- )
53
-
54
- iface.launch()
 
44
  return json.loads(response.content.decode("utf-8"))[0]['generated_text']
45
 
46
 
47
+ with gr.Blocks() as demo:
48
+ textbox = gr.Textbox(placeholder="Type business type here and press enter...", lines=4)
49
+ btn = gr.Button("Generate")
50
+ output1 = gr.Textbox(lines=4,label='1')
51
+ btn.click(complete_with_gpt,inputs=[textbox], outputs=[output1])
52
+
53
+ demo.launch()