decodemai commited on
Commit
73bfffc
1 Parent(s): feafb4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -41,7 +41,7 @@ def query(text):
41
  print('Response here\n',response.content)
42
  generated_text=json.loads(response.content.decode("utf-8"))[0]['generated_text']
43
  print(generated_text)
44
- result = generated_text.replace(prompt,'').strip()
45
  result = result.replace("Output:","")
46
  parts = result.split("###")
47
  topic = parts[0].strip()
@@ -49,10 +49,15 @@ def query(text):
49
 
50
 
51
  with gr.Blocks() as demo:
52
- textbox = gr.Textbox(placeholder="Type business type here and press enter...", lines=4)
 
 
 
 
53
  btn = gr.Button("Generate")
54
- output1 = gr.Textbox(lines=4,label='1')
55
- examples=[['icecream parlor'],['space travel'],['book shop'],['ecommerce'],['grocery delivery']]
 
56
  btn.click(query,inputs=[textbox], outputs=[output1])
57
 
58
 
 
41
  print('Response here\n',response.content)
42
  generated_text=json.loads(response.content.decode("utf-8"))[0]['generated_text']
43
  print(generated_text)
44
+ result = generated_text.replace(text,'').strip()
45
  result = result.replace("Output:","")
46
  parts = result.split("###")
47
  topic = parts[0].strip()
 
49
 
50
 
51
  with gr.Blocks() as demo:
52
+ gr.Markdown("<h1><center>ChatGPT based Insights from Decodem.ai for businesses</center></h1>")
53
+ gr.Markdown(
54
+ """While ChatGPT has multiple use cases we have evolved specific use cases/ templates for businesses \n\n This template provides ideas on how a business would look like in the future. Enter a business area and get the results."""
55
+ )
56
+ textbox = gr.Textbox(placeholder="Enter business type here...", lines=1)
57
  btn = gr.Button("Generate")
58
+ output1 = gr.Textbox(lines=2,label='The future')
59
+ examples= example_problem = gr.Radio(['icecream parlor','space travel','book shop','ecommerce','grocery delivery'], label= "Examples")
60
+
61
  btn.click(query,inputs=[textbox], outputs=[output1])
62
 
63