Rahatara commited on
Commit
fd4332b
·
verified ·
1 Parent(s): 6c1e129

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -11
app.py CHANGED
@@ -13,7 +13,7 @@ SYSTEM_PROMPT = (
13
  )
14
 
15
  # -----------------------------
16
- # Chat logic (NO message schema)
17
  # -----------------------------
18
  def chat(user_input, history):
19
  if history is None:
@@ -36,7 +36,7 @@ def chat(user_input, history):
36
  reply = completion.choices[0].message.content
37
  history.append((user_input, reply))
38
 
39
- return history, history
40
 
41
 
42
  # -----------------------------
@@ -59,18 +59,12 @@ def generate_storyboard(scenario):
59
 
60
 
61
  # -----------------------------
62
- # UI (NO Blocks, NO schema)
63
  # -----------------------------
64
  chat_ui = gr.Interface(
65
  fn=chat,
66
- inputs=[
67
- gr.Textbox(label="Your Message"),
68
- gr.State([])
69
- ],
70
- outputs=[
71
- gr.Chatbot(label="Storyboard Chat"),
72
- gr.State([])
73
- ],
74
  title="📖 Storyboard Assistant",
75
  )
76
 
 
13
  )
14
 
15
  # -----------------------------
16
+ # Chat logic (Interface-safe)
17
  # -----------------------------
18
  def chat(user_input, history):
19
  if history is None:
 
36
  reply = completion.choices[0].message.content
37
  history.append((user_input, reply))
38
 
39
+ return history
40
 
41
 
42
  # -----------------------------
 
59
 
60
 
61
  # -----------------------------
62
+ # UI (Interface ONLY)
63
  # -----------------------------
64
  chat_ui = gr.Interface(
65
  fn=chat,
66
+ inputs=gr.Textbox(label="Your Message"),
67
+ outputs=gr.Chatbot(label="Storyboard Chat"),
 
 
 
 
 
 
68
  title="📖 Storyboard Assistant",
69
  )
70