Spaces:
Runtime error
Runtime error
mrfakename
commited on
Commit
•
0b7b4c3
1
Parent(s):
cec9ca3
Update app.py
Browse files
app.py
CHANGED
@@ -118,14 +118,16 @@ def phine(message, history, temperature, top_p, top_k, repetition_penalty):
|
|
118 |
res = cut_text_after_last_token(completion, token)
|
119 |
return res.replace('<|endoftext|>', '')
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
|
|
130 |
if __name__ == "__main__":
|
131 |
demo.queue().launch(share=True, debug=True) #If debug=True causes problems you can set it to False
|
|
|
118 |
res = cut_text_after_last_token(completion, token)
|
119 |
return res.replace('<|endoftext|>', '')
|
120 |
|
121 |
+
|
122 |
+
demo = gr.ChatInterface(phine,
|
123 |
+
title="Phine Demo",
|
124 |
+
article="Demo of [Phine 2](https://huggingface.co/freecs/phine-2-v0). We are not affiliated with and do not endorse Phine 2.",
|
125 |
+
additional_inputs=[
|
126 |
+
gr.Slider(0.1, 2.0, label="temperature", value=0.5),
|
127 |
+
gr.Slider(0.1, 2.0, label="Top P", value=0.9),
|
128 |
+
gr.Slider(1, 500, label="Top K", value=50),
|
129 |
+
gr.Slider(0.1, 2.0, label="Repetition Penalty", value=1.15)
|
130 |
+
]
|
131 |
+
)
|
132 |
if __name__ == "__main__":
|
133 |
demo.queue().launch(share=True, debug=True) #If debug=True causes problems you can set it to False
|