Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,12 @@ Plutus 8B is The Fin AI's latest iteration of open LLMs.
|
|
| 14 |
This is a demo of [`TheFinAI/plutus-8B-instruct`](https://huggingface.co/TheFinAI/plutus-8B-instruct), fine-tuned for instruction following.
|
| 15 |
"""
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
MAX_MAX_NEW_TOKENS = 2048
|
| 18 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
| 19 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
|
@@ -68,7 +74,7 @@ def generate(
|
|
| 68 |
outputs.append(text)
|
| 69 |
yield "".join(outputs)
|
| 70 |
|
| 71 |
-
|
| 72 |
demo = gr.ChatInterface(
|
| 73 |
fn=generate,
|
| 74 |
additional_inputs=[
|
|
@@ -110,17 +116,18 @@ demo = gr.ChatInterface(
|
|
| 110 |
],
|
| 111 |
stop_btn=None,
|
| 112 |
examples=[
|
| 113 |
-
["
|
| 114 |
-
["
|
| 115 |
-
["
|
| 116 |
-
["
|
| 117 |
-
["
|
| 118 |
],
|
| 119 |
cache_examples=False,
|
| 120 |
type="messages",
|
| 121 |
description=DESCRIPTION,
|
| 122 |
css_paths="style.css",
|
| 123 |
fill_height=True,
|
|
|
|
| 124 |
)
|
| 125 |
|
| 126 |
|
|
|
|
| 14 |
This is a demo of [`TheFinAI/plutus-8B-instruct`](https://huggingface.co/TheFinAI/plutus-8B-instruct), fine-tuned for instruction following.
|
| 15 |
"""
|
| 16 |
|
| 17 |
+
PLACEHOLDER = """
|
| 18 |
+
<div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
| 19 |
+
<h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">Plutus 8B instruct</h1>
|
| 20 |
+
</div>
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
MAX_MAX_NEW_TOKENS = 2048
|
| 24 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
| 25 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
|
|
|
| 74 |
outputs.append(text)
|
| 75 |
yield "".join(outputs)
|
| 76 |
|
| 77 |
+
chatbot=gr.Chatbot(placeholder=PLACEHOLDER,scale=1)
|
| 78 |
demo = gr.ChatInterface(
|
| 79 |
fn=generate,
|
| 80 |
additional_inputs=[
|
|
|
|
| 116 |
],
|
| 117 |
stop_btn=None,
|
| 118 |
examples=[
|
| 119 |
+
["Γεια σας! Πώς πηγαίνουν οι επενδύσεις σας σήμερα;"],
|
| 120 |
+
["Μπορείτε να μου εξηγήσετε συνοπτικά τι είναι το ελληνικό χρηματιστήριο;"],
|
| 121 |
+
["Περιγράψτε τη σημασία της Ευρωπαϊκής Κεντρικής Τράπεζας για την ελληνική οικονομία σε μία πρόταση."],
|
| 122 |
+
["Πόσο χρόνο χρειάζεται ένας επενδυτής για να κατανοήσει πλήρως την ελληνική αγορά ομολόγων;"],
|
| 123 |
+
["Γράψτε ένα άρθρο 100 λέξεων σχετικά με 'Τα οφέλη της Τεχνητής Νοημοσύνης στη Χρηματοοικονομική Ανάλυση στην Ελλάδα'."],
|
| 124 |
],
|
| 125 |
cache_examples=False,
|
| 126 |
type="messages",
|
| 127 |
description=DESCRIPTION,
|
| 128 |
css_paths="style.css",
|
| 129 |
fill_height=True,
|
| 130 |
+
chatbot=chatbot,
|
| 131 |
)
|
| 132 |
|
| 133 |
|