Update app.py
Browse files
app.py
CHANGED
|
@@ -53,6 +53,25 @@ persona_alpha_demo = gr.Interface(
|
|
| 53 |
outputs=[gr.Textbox(label="角色人物描述",lines=25)],
|
| 54 |
allow_flagging="never", )
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
persona_beta_demo = gr.Interface(
|
| 57 |
description="人物誌生成器(Persona Generator),藉由選擇的CCS標籤資訊打造豐富的人物誌(不包含一日程)。",
|
| 58 |
fn=persona_beta.generate_persona,
|
|
@@ -84,5 +103,5 @@ persona_beta_demo_schedule = gr.Interface(
|
|
| 84 |
outputs=[gr.Textbox(label="角色人物日程",lines=25)],
|
| 85 |
allow_flagging="never", )
|
| 86 |
|
| 87 |
-
demo = gr.TabbedInterface([persona_alpha_demo,persona_beta_demo,persona_beta_demo_schedule], ["Persona生成器(aplha)","Persona生成器(beta)","Persona生成器(beta)_schedule"],theme='bethecloud/storj_theme')
|
| 88 |
demo.launch()
|
|
|
|
| 53 |
outputs=[gr.Textbox(label="角色人物描述",lines=25)],
|
| 54 |
allow_flagging="never", )
|
| 55 |
|
| 56 |
+
persona_alpha_1_demo = gr.Interface(
|
| 57 |
+
description="人物誌生成器(Persona Generator),藉由選擇的CCS標籤資訊打造豐富的人物誌。",
|
| 58 |
+
fn=persona_alpha.generate_detailed_persona,
|
| 59 |
+
inputs=[
|
| 60 |
+
gr.Dropdown(label="性別", choices=["不指定", "男性", "女性", "非二元性別"], value="不指定"),
|
| 61 |
+
gr.Dropdown(label="年齡階層", choices=["不指定", "未滿18歲","18-24", "25-34", "35-44", "45-54", "55-64", "65歲或以上"], value="不指定"),
|
| 62 |
+
gr.Dropdown(label="生命階段", choices=["不指定", "15-29歲單身(自己一人居住)", "30-44歲單身(自己一人居住)", "15-44歲頂客族(「未婚有同居伴侶」或「已婚」,但沒有小孩)", "45歲以上頂客族(「未婚有同居伴侶」或「已婚」,但沒有小孩)", "青年家庭(18歲以上,有12歲以下的小孩)", "成熟家庭(18歲以上,有13-17歲的小孩)", "空巢期(55歲以上,有同居伴侶或已婚,且小孩18歲+不與父母同住)", "多世代家庭(18歲以上,與父母、祖父母、成年的家人/親戚同住)"], value="不指定"),
|
| 63 |
+
gr.Dropdown(label="教育程度", choices=["不指定", "國小或國小以下", "國中", "高中", "專科/大學", "研究所以上", "其他"], value="不指定"),
|
| 64 |
+
gr.Dropdown(label="工作職稱", choices=["不指定", "基層主管", "職工/藍領工作者", "自由業", "雇員/白領工作者", "專業人士(例如:醫生、律師、會計師、老師)", "自營商老闆", "中高階主管", "C-Level(CEO, CFO)/專業經理人(含大企業負責人)", "中小企業負責人", "其他", "不適用"], value="不指定"),
|
| 65 |
+
gr.Dropdown(label="個人年收入", choices=["不指定", "未滿30萬元", "30萬元以上,未滿40萬元", "40萬元以上,未滿50萬元", "50萬元以上,未滿60萬元", "60萬元以上,未滿80萬元", "80萬元以上,未滿100萬元", "100萬元以上,未滿140萬元", "140萬元以上,未滿180萬元", "180萬元以上,未滿240萬元", "240萬元以上,未滿360萬元", "360萬元以上"], value="不指定"),
|
| 66 |
+
gr.Textbox(label="人群的CCS描述(10句你覺得最有代表性的,每句後加逗號)", value="", lines=10),
|
| 67 |
+
gr.CheckboxGroup(label="興趣愛好", choices=["閱讀", "旅遊", "運動", "烹飪", "攝影", "繪畫", "音樂", "園藝", "電子遊戲", "觀賞電影"], value=[]),
|
| 68 |
+
gr.Textbox(label="其他興趣愛好(請填寫)", value=""),
|
| 69 |
+
gr.CheckboxGroup(label="性格特質", choices=["外向", "內向", "樂觀", "悲觀", "創新", "保守", "細心", "大膽", "耐心", "急躁"], value=[]),
|
| 70 |
+
gr.Textbox(label="其他性格特質(請填寫)", value=""),
|
| 71 |
+
],
|
| 72 |
+
outputs=[gr.Textbox(label="角色人物描述",lines=25)],
|
| 73 |
+
allow_flagging="never", )
|
| 74 |
+
|
| 75 |
persona_beta_demo = gr.Interface(
|
| 76 |
description="人物誌生成器(Persona Generator),藉由選擇的CCS標籤資訊打造豐富的人物誌(不包含一日程)。",
|
| 77 |
fn=persona_beta.generate_persona,
|
|
|
|
| 103 |
outputs=[gr.Textbox(label="角色人物日程",lines=25)],
|
| 104 |
allow_flagging="never", )
|
| 105 |
|
| 106 |
+
demo = gr.TabbedInterface([persona_alpha_demo,persona_alpha_1_demo,demo,persona_beta_demo,persona_beta_demo_schedule], ["Persona生成器(aplha)","Persona生成器(aplha_1)","Persona生成器(beta)","Persona生成器(beta)_schedule"],theme='bethecloud/storj_theme')
|
| 107 |
demo.launch()
|