kfkas commited on
Commit
4a6d7a6
·
1 Parent(s): 1829ad4
Files changed (3) hide show
  1. app.py +15 -0
  2. video/sample.mp4 +3 -0
  3. video/sample2.mp4 +3 -0
app.py CHANGED
@@ -569,6 +569,7 @@ class App:
569
  order_summary_display = gr.Textbox(label="청구서", value="주문 메뉴 없음", lines=8, max_lines=12,
570
  interactive=False)
571
 
 
572
  # --- 탭 2: 프롬프트 편집 전용 (넓게!) ---
573
  with gr.TabItem("Edit Prompt"):
574
  gr.Markdown("### Prompt Editor")
@@ -582,6 +583,20 @@ class App:
582
  value="Loading prompt..." # 초기값, 핸들러 통해 업데이트됨
583
  )
584
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  # --- 이벤트 핸들러 연결 ---
586
  # 컴포넌트들이 모두 정의된 후에 연결해야 함
587
  # (실제 코드에서는 컴포넌트 None 체크 또는 더 나은 구조화 필요)
 
569
  order_summary_display = gr.Textbox(label="청구서", value="주문 메뉴 없음", lines=8, max_lines=12,
570
  interactive=False)
571
 
572
+
573
  # --- 탭 2: 프롬프트 편집 전용 (넓게!) ---
574
  with gr.TabItem("Edit Prompt"):
575
  gr.Markdown("### Prompt Editor")
 
583
  value="Loading prompt..." # 초기값, 핸들러 통해 업데이트됨
584
  )
585
 
586
+ gr.Examples(
587
+ examples=[
588
+ # 입력 순서: [Alibaba API Key, Video, Subtotal, Star Rating, Review, Prompt Editor] + [각 음식의 Qty]
589
+ ["", "video/sample.mp4", 0.0, 5, "He drop the tray..so bad", "Default prompt", 0, 0, 0, 0, 0, 2, 0,
590
+ 0],
591
+ ["","video/sample2.mp4", 0.0, 5, "Good service!", "Default prompt", 1, 1, 0, 0, 0, 1, 0, 0]
592
+ ],
593
+ inputs=[alibaba_key_input, video_input, subtotal_display, rating_input, review_input,
594
+ prompt_editor] + quantity_inputs,
595
+ outputs=[analysis_display, tip_display, total_bill_display, prompt_editor, video_input,
596
+ order_summary_display],
597
+ label="Example: Bad Service, Good Service"
598
+ )
599
+
600
  # --- 이벤트 핸들러 연결 ---
601
  # 컴포넌트들이 모두 정의된 후에 연결해야 함
602
  # (실제 코드에서는 컴포넌트 None 체크 또는 더 나은 구조화 필요)
video/sample.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7124bb294dd374389d8da2b25661c6152b7a90eecf97fc4731ba46a292d90680
3
+ size 801305
video/sample2.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c76e3ac3f9e1db2529f5b429bc2f9a81209f2a1ac8fcae4f7fc765f26c61a4e
3
+ size 2286548