ginipick commited on
Commit
6e0a33d
ยท
verified ยท
1 Parent(s): 678d443

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -17
app.py CHANGED
@@ -188,23 +188,8 @@ PLACEHOLDER = """
188
  </div>
189
  """
190
 
191
- demo = gr.Interface(
192
  fn=respond,
193
- inputs=[
194
- gr.Textbox(placeholder="๋ฉ”์‹œ์ง€๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”...", label=""),
195
- gr.State([]), # ๋Œ€ํ™” ๊ธฐ๋ก์„ ์ €์žฅํ•˜๋Š” State
196
- gr.Textbox(
197
- value="You are a deep thinking AI, you may use extremely long chains of thought to deeply consider the problem and deliberate with yourself via systematic reasoning processes to help come to a correct solution prior to answering. You should enclose your thoughts and internal monologue inside tags, and then provide your solution or response to the problem.",
198
- label="์‹œ์Šคํ…œ ๋ฉ”์‹œ์ง€",
199
- lines=5
200
- ),
201
- gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="์ตœ๋Œ€ ํ† ํฐ ์ˆ˜"),
202
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
203
- gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p"),
204
- gr.Slider(minimum=0, maximum=100, value=40, step=1, label="Top-k"),
205
- gr.Slider(minimum=0.0, maximum=2.0, value=1.1, step=0.1, label="Repetition penalty"),
206
- ],
207
- outputs=gr.Chatbot(placeholder=PLACEHOLDER, type="messages"),
208
  title="Ginigen Private AI",
209
  description="6BIT ์–‘์žํ™”๋กœ ๋ชจ๋ธ ํฌ๊ธฐ๋Š” ์ค„์ด๊ณ  ์„ฑ๋Šฅ์€ ์œ ์ง€ํ•˜๋Š” ํ”„๋ผ์ด๋ฒ„์‹œ ์ค‘์‹ฌ AI ์†”๋ฃจ์…˜.",
210
  theme=gr.themes.Soft(primary_hue="violet", secondary_hue="violet", neutral_hue="gray",font=[gr.themes.GoogleFont("Exo"), "ui-sans-serif", "system-ui", "sans-serif"]).set(
@@ -226,7 +211,19 @@ demo = gr.Interface(
226
  ["๋ฏธ์ŠคํŠธ๋ž„ ๋ชจ๋ธ์˜ ํŠน์ง•์€ ๋ฌด์—‡์ธ๊ฐ€์š”?"],
227
  ["๊ธด ์ปจํ…์ŠคํŠธ(context)๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•ด ์ฃผ์„ธ์š”."]
228
  ],
229
- cache_examples=False
 
 
 
 
 
 
 
 
 
 
 
 
230
  )
231
 
232
  if __name__ == "__main__":
 
188
  </div>
189
  """
190
 
191
+ demo = gr.ChatInterface(
192
  fn=respond,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  title="Ginigen Private AI",
194
  description="6BIT ์–‘์žํ™”๋กœ ๋ชจ๋ธ ํฌ๊ธฐ๋Š” ์ค„์ด๊ณ  ์„ฑ๋Šฅ์€ ์œ ์ง€ํ•˜๋Š” ํ”„๋ผ์ด๋ฒ„์‹œ ์ค‘์‹ฌ AI ์†”๋ฃจ์…˜.",
195
  theme=gr.themes.Soft(primary_hue="violet", secondary_hue="violet", neutral_hue="gray",font=[gr.themes.GoogleFont("Exo"), "ui-sans-serif", "system-ui", "sans-serif"]).set(
 
211
  ["๋ฏธ์ŠคํŠธ๋ž„ ๋ชจ๋ธ์˜ ํŠน์ง•์€ ๋ฌด์—‡์ธ๊ฐ€์š”?"],
212
  ["๊ธด ์ปจํ…์ŠคํŠธ(context)๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•ด ์ฃผ์„ธ์š”."]
213
  ],
214
+ additional_inputs=[
215
+ gr.Textbox(
216
+ value="You are a deep thinking AI, you may use extremely long chains of thought to deeply consider the problem and deliberate with yourself via systematic reasoning processes to help come to a correct solution prior to answering. You should enclose your thoughts and internal monologue inside tags, and then provide your solution or response to the problem.",
217
+ label="์‹œ์Šคํ…œ ๋ฉ”์‹œ์ง€",
218
+ lines=5
219
+ ),
220
+ gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="์ตœ๋Œ€ ํ† ํฐ ์ˆ˜"),
221
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
222
+ gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p"),
223
+ gr.Slider(minimum=0, maximum=100, value=40, step=1, label="Top-k"),
224
+ gr.Slider(minimum=0.0, maximum=2.0, value=1.1, step=0.1, label="Repetition penalty"),
225
+ ],
226
+ chatbot=gr.Chatbot(placeholder=PLACEHOLDER, type="messages")
227
  )
228
 
229
  if __name__ == "__main__":