Update app.py
Browse files
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,
|