biftekpatates commited on
Commit
00afb2a
ยท
verified ยท
1 Parent(s): eeaf79b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -78,10 +78,12 @@ with gr.Blocks() as demo:
78
  # ์ฒซ ๋ฒˆ์งธ ๋ฉ”์‹œ์ง€๋Š” (user="", assistant=INITIAL_PROMPT) ํ˜•ํƒœ๋กœ ๋„ฃ์–ด
79
  # ํ™”๋ฉด์ƒ์—์„œ 'assistant'๊ฐ€ INITIAL_PROMPT๋ฅผ ๋งํ•œ ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ด๊ฒŒ ํ•จ
80
  chatbot = gr.Chatbot(
81
- value=[("", INITIAL_PROMPT)], # (user, assistant)
82
- height=500
 
83
  )
84
 
 
85
  # (user, assistant) ์Œ์„ ์ €์žฅํ•  ํžˆ์Šคํ† ๋ฆฌ ์ƒํƒœ
86
  # ์—ฌ๊ธฐ์„œ๋„ ๋™์ผํ•œ ์ดˆ๊ธฐ ์ƒํƒœ๋ฅผ ๋„ฃ์–ด์คŒ
87
  state_history = gr.State([("", INITIAL_PROMPT)])
@@ -106,4 +108,4 @@ with gr.Blocks() as demo:
106
 
107
  # ๋ฉ”์ธ ์‹คํ–‰
108
  if __name__ == "__main__":
109
- demo.launch(server_name="0.0.0.0", server_port=7860)
 
78
  # ์ฒซ ๋ฒˆ์งธ ๋ฉ”์‹œ์ง€๋Š” (user="", assistant=INITIAL_PROMPT) ํ˜•ํƒœ๋กœ ๋„ฃ์–ด
79
  # ํ™”๋ฉด์ƒ์—์„œ 'assistant'๊ฐ€ INITIAL_PROMPT๋ฅผ ๋งํ•œ ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ด๊ฒŒ ํ•จ
80
  chatbot = gr.Chatbot(
81
+ value=[{"role": "assistant", "content": INITIAL_PROMPT}],
82
+ height=500,
83
+ type="messages"
84
  )
85
 
86
+
87
  # (user, assistant) ์Œ์„ ์ €์žฅํ•  ํžˆ์Šคํ† ๋ฆฌ ์ƒํƒœ
88
  # ์—ฌ๊ธฐ์„œ๋„ ๋™์ผํ•œ ์ดˆ๊ธฐ ์ƒํƒœ๋ฅผ ๋„ฃ์–ด์คŒ
89
  state_history = gr.State([("", INITIAL_PROMPT)])
 
108
 
109
  # ๋ฉ”์ธ ์‹คํ–‰
110
  if __name__ == "__main__":
111
+ demo.launch(server_name="0.0.0.0", server_port=7860, share=True)