Update app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,49 @@ import strategyGen
|
|
| 11 |
import ideaGen
|
| 12 |
import ideaGen_Followup
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
youtube_insight_demo = gr.Interface(fn=ideaGen_youtube_insight.ideagen,
|
| 15 |
inputs=[
|
| 16 |
gr.Dropdown(
|
|
@@ -38,7 +81,7 @@ youtube_insight_demo = gr.Interface(fn=ideaGen_youtube_insight.ideagen,
|
|
| 38 |
outputs =[gr.Textbox(lines=10)],
|
| 39 |
allow_flagging="never", )
|
| 40 |
|
| 41 |
-
strategy_demo = gr.Interface(fn=
|
| 42 |
inputs=[
|
| 43 |
gr.Dropdown(
|
| 44 |
label = "分析方式",
|
|
@@ -73,5 +116,5 @@ strategy_demo = gr.Interface(fn=strategy.ideagen,
|
|
| 73 |
allow_flagging="never", )
|
| 74 |
|
| 75 |
|
| 76 |
-
demo = gr.TabbedInterface([strategy_demo, youtube_insight_demo], ["策略生成器", "靈感生成器(Youtube
|
| 77 |
demo.launch()
|
|
|
|
| 11 |
import ideaGen
|
| 12 |
import ideaGen_Followup
|
| 13 |
|
| 14 |
+
ideaGen_demo = gr.Interface(theme=gr.themes.Soft(), fn=ideaGen.ideagen,
|
| 15 |
+
inputs=[
|
| 16 |
+
gr.Dropdown(
|
| 17 |
+
label = "生成內容",
|
| 18 |
+
info = "請選擇要生成的Idea種類",
|
| 19 |
+
choices = ["YouTube 創意影片", "線下體驗 / 店頭活動", "數位 / 手機 / 線上互動","TikTok 趣味短片" ,"Instagram UGC 活動","Social 貼文 / 網頁或廣告標題"],
|
| 20 |
+
type = "index",
|
| 21 |
+
),
|
| 22 |
+
gr.Textbox(
|
| 23 |
+
label = "品牌名稱",
|
| 24 |
+
value = "Toyota"
|
| 25 |
+
),
|
| 26 |
+
gr.Textbox(
|
| 27 |
+
label = "產品名稱",
|
| 28 |
+
value = "電動車"
|
| 29 |
+
),
|
| 30 |
+
gr.Dropdown(
|
| 31 |
+
label = "目標對象",
|
| 32 |
+
info = "請選擇針對的年齡區間",
|
| 33 |
+
choices = ["Z世代(1997-2012)", "千禧世代(1981-1996)", "X世代(1965-1980)", "嬰兒潮世代(1955-1964)"],
|
| 34 |
+
),
|
| 35 |
+
gr.Textbox(
|
| 36 |
+
label = "核心精神",
|
| 37 |
+
value = "先進數位娛樂空間,可以在車上玩Steam"
|
| 38 |
+
)],
|
| 39 |
+
outputs =[gr.Textbox(lines=30)],
|
| 40 |
+
allow_flagging="never", )
|
| 41 |
+
|
| 42 |
+
ideaGen_Followup_demo = gr.Interface(theme=gr.themes.Soft(), fn=ideaGen_Followup.ideagen,
|
| 43 |
+
inputs=[
|
| 44 |
+
gr.Dropdown(
|
| 45 |
+
label = "生成內容",
|
| 46 |
+
choices = ["YouTube 創意影片", "線下體驗 / 店頭活動", "數位 / 手機 / 線上互動","TikTok 趣味短片" ,"Instagram UGC 活動","Social 貼文 / 網頁或廣告標題"],
|
| 47 |
+
type = "index",
|
| 48 |
+
value = 0),
|
| 49 |
+
gr.Textbox(
|
| 50 |
+
label = "前述內容",
|
| 51 |
+
value = "",
|
| 52 |
+
lines = 15
|
| 53 |
+
)] ,
|
| 54 |
+
outputs =[gr.Textbox(lines=10)],
|
| 55 |
+
allow_flagging="never", )
|
| 56 |
+
|
| 57 |
youtube_insight_demo = gr.Interface(fn=ideaGen_youtube_insight.ideagen,
|
| 58 |
inputs=[
|
| 59 |
gr.Dropdown(
|
|
|
|
| 81 |
outputs =[gr.Textbox(lines=10)],
|
| 82 |
allow_flagging="never", )
|
| 83 |
|
| 84 |
+
strategy_demo = gr.Interface(fn=strategyGen.ideagen,
|
| 85 |
inputs=[
|
| 86 |
gr.Dropdown(
|
| 87 |
label = "分析方式",
|
|
|
|
| 116 |
allow_flagging="never", )
|
| 117 |
|
| 118 |
|
| 119 |
+
demo = gr.TabbedInterface([ideaGen_demo , ideaGen_Followup_demo , strategy_demo, youtube_insight_demo], ["靈感生成器" , "靈感生成器(下一步)" , "策略生成器", "靈感生成器(Youtube+insight版)"])
|
| 120 |
demo.launch()
|