saicharantej commited on
Commit
8978380
·
verified ·
1 Parent(s): 3b8b7a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -12
app.py CHANGED
@@ -24,27 +24,24 @@ def cohere_response(msg):
24
  def generate_prototype(problem):
25
  prompt_sum = f'''You are a UX designer who is an expert in generating front-end code for a given requirement from a product manager: {problem}. Follow these step-by-step instructions to create a series of mockups that form a clickable prototype:
26
 
27
- Understand the Requirement: Carefully read and understand the requirement provided by the product manager.
28
 
29
- Identify Personas: Identify the personas outlined in the input problem. For example, if the requirement is for an e-commerce website, personas could include:
30
 
31
  Shopper
32
  Seller
33
  Administrator
34
- Generate Critical User Journeys (CUJs): For each persona, generate Critical User Journeys. For example:
35
 
36
- Shopper: Searching for a product, adding a product to the cart, checking out.
37
- Seller: Listing a product, managing inventory, viewing sales reports.
38
- Administrator: Managing users, handling transactions, viewing site analytics.
39
- Create Screens: Based on the CUJs, create the corresponding screens. For each screen, write HTML code that includes the header with the screen number and the CUJ it caters to. Ensure each screen links to the next to form a clickable prototype.
40
 
41
- Use Bootstrap and Visual Libraries: Utilize Bootstrap and other popular visual libraries to enhance the design and functionality of the mockups.
42
 
43
- Avoid Placeholders: Do not use placeholders. Instead, assume real-world use cases to make the mockups useful and realistic.
44
 
45
- Ensure Visual Appeal: The mockups should be visually appealing and user-friendly.
46
 
47
- Output HTML Code Only: Generate only the HTML code for the mockups, nothing else. Do not generate commentary around descriptions of the approach followed by the assistant.
48
 
49
  This commentary will be too distracting to include in the HTML mocks for the Gradio app.
50
 
@@ -115,5 +112,5 @@ gr.Interface(
115
  outputs=[gr.HTML(),gr.Textbox()],
116
  title="Prototype generator",
117
  description="Generate a prototype for a given requirement",
118
- examples=["Generate a clickable prototype for an e-commerce site with personas: Shopper, Seller, Administrator, and CUJs like searching for products, listing products, and managing users.","Create a prototype for an online learning platform with personas: Student, Instructor, Administrator, and CUJs like browsing courses, creating courses, and managing users.","Design a prototype for a social media app with personas: User, Moderator, Admin, and CUJs like posting updates, moderating content, and managing users.","Build a prototype for a banking app with personas: Customer, Banker, Admin, and CUJs like checking account balances, managing accounts, and overseeing transactions.","Develop a prototype for a healthcare portal with personas: Patient, Doctor, Admin, and CUJs like booking appointments, managing patient records, and overseeing user activities."],
119
  ).launch()
 
24
  def generate_prototype(problem):
25
  prompt_sum = f'''You are a UX designer who is an expert in generating front-end code for a given requirement from a product manager: {problem}. Follow these step-by-step instructions to create a series of mockups that form a clickable prototype:
26
 
27
+ 1.Understand the Requirement: Carefully read and understand the requirement provided by the product manager.
28
 
29
+ 2.Identify Personas: Identify the personas outlined in the input problem. For example, if the requirement is for an e-commerce website, personas could include:
30
 
31
  Shopper
32
  Seller
33
  Administrator
34
+ 3.Generate Critical User Journeys (CUJs): For each persona, generate detailed Critical User Journeys that fully capture the persona's intent.
35
 
36
+ 4.Create Screens: Based on the CUJs, create the corresponding screens. For each screen, write HTML code that includes the header with the screen number and the CUJ it caters to. Ensure each screen links to the next to form a clickable prototype.
 
 
 
37
 
38
+ 5.Use Bootstrap and Visual Libraries: Utilize Bootstrap and other popular visual libraries to enhance the design and functionality of the mockups.
39
 
40
+ 6.Avoid Placeholders: Do not use placeholders. Instead, assume real-world use cases to make the mockups useful and realistic.
41
 
42
+ 7.Ensure Visual Appeal: The mockups should be visually appealing and user-friendly.
43
 
44
+ 8.Output HTML Code Only: Generate only the HTML code for the mockups, nothing else. Do not generate commentary around descriptions of the approach followed by the assistant.
45
 
46
  This commentary will be too distracting to include in the HTML mocks for the Gradio app.
47
 
 
112
  outputs=[gr.HTML(),gr.Textbox()],
113
  title="Prototype generator",
114
  description="Generate a prototype for a given requirement",
115
+ examples=["Generate a clickable prototype for an e-commerce site with personas: Shopper, Seller, Administrator, and CUJs like searching for products, listing products, and managing users.","Create a prototype for an online learning platform with personas: Student, Instructor, Administrator, and CUJs like browsing courses, creating courses, and managing users.","Build a prototype for a banking app with personas: Customer, Banker, Admin, and CUJs like checking account balances, managing accounts, and overseeing transactions.","Develop a prototype for a healthcare portal with personas: Patient, Doctor, Admin, and CUJs like booking appointments, managing patient records, and overseeing user activities."],
116
  ).launch()