seawolf2357 commited on
Commit
8ef414b
ยท
verified ยท
1 Parent(s): 83ebdaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -104,6 +104,15 @@ def generate(prompt, history=[], temperature=0.1, max_new_tokens=25000, top_p=0.
104
  except Exception as e:
105
  yield f"Error: {str(e)}"
106
 
 
 
 
 
 
 
 
 
 
107
  examples = [
108
  ["์ข‹์€ ์˜ˆ์ œ๋ฅผ ์•Œ๋ ค์ค˜.", []], # history ๊ฐ’์„ ๋นˆ ๋ฆฌ์ŠคํŠธ๋กœ ์ œ๊ณต
109
  ["requirements.txt ์ถœ๋ ฅ", []],
@@ -114,6 +123,7 @@ examples = [
114
 
115
  demo = gr.Interface(
116
  fn=generate,
 
117
  inputs=[gr.Textbox(label="์งˆ๋ฌธ์„ ์ž…๋ ฅํ•˜์„ธ์š”", placeholder="์—ฌ๊ธฐ์— ์งˆ๋ฌธ์„ ์ž…๋ ฅํ•˜์„ธ์š”...", lines=2), gr.JSON(label="History", value=[])],
118
  outputs=gr.Markdown(),
119
  examples=examples,
 
104
  except Exception as e:
105
  yield f"Error: {str(e)}"
106
 
107
+ mychatbot = gr.Chatbot(
108
+ avatar_images=["./user.png", "./botm.png"],
109
+ bubble_full_width=False,
110
+ show_label=False,
111
+ show_copy_button=True,
112
+ likeable=True,
113
+ )
114
+
115
+
116
  examples = [
117
  ["์ข‹์€ ์˜ˆ์ œ๋ฅผ ์•Œ๋ ค์ค˜.", []], # history ๊ฐ’์„ ๋นˆ ๋ฆฌ์ŠคํŠธ๋กœ ์ œ๊ณต
118
  ["requirements.txt ์ถœ๋ ฅ", []],
 
123
 
124
  demo = gr.Interface(
125
  fn=generate,
126
+ chatbot=mychatbot,
127
  inputs=[gr.Textbox(label="์งˆ๋ฌธ์„ ์ž…๋ ฅํ•˜์„ธ์š”", placeholder="์—ฌ๊ธฐ์— ์งˆ๋ฌธ์„ ์ž…๋ ฅํ•˜์„ธ์š”...", lines=2), gr.JSON(label="History", value=[])],
128
  outputs=gr.Markdown(),
129
  examples=examples,