Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,12 +6,11 @@ file_name = "mpt-7b-instruct-q4_0-ggjt.bin"
|
|
| 6 |
|
| 7 |
examples = [
|
| 8 |
"Write a travel blog about a 3-day trip to Thailand.",
|
| 9 |
-
"
|
| 10 |
-
"
|
| 11 |
-
"
|
| 12 |
-
"Explain how a candle works to a 6 year old in a few sentences.",
|
| 13 |
"What are some of the most common misconceptions about birds?",
|
| 14 |
-
"Explain why the
|
| 15 |
]
|
| 16 |
|
| 17 |
session_config = SessionConfig(threads=2,batch_size=2)
|
|
@@ -37,16 +36,16 @@ with gr.Blocks(
|
|
| 37 |
css=".disclaimer {font-variant-caps: all-small-caps;}",
|
| 38 |
) as demo:
|
| 39 |
gr.Markdown(
|
| 40 |
-
"""<h1><center>
|
| 41 |
|
| 42 |
-
This demo
|
| 43 |
"""
|
| 44 |
)
|
| 45 |
with gr.Row():
|
| 46 |
with gr.Column():
|
| 47 |
with gr.Row():
|
| 48 |
instruction = gr.Textbox(
|
| 49 |
-
placeholder="Enter your question here",
|
| 50 |
label="Question/Instruction",
|
| 51 |
elem_id="q-input",
|
| 52 |
)
|
|
|
|
| 6 |
|
| 7 |
examples = [
|
| 8 |
"Write a travel blog about a 3-day trip to Thailand.",
|
| 9 |
+
"Tell me a short story about a robot that has a nice day.",
|
| 10 |
+
"Compose a tweet to congratulate rustformers on the launch of their HuggingFace Space.",
|
| 11 |
+
"Explain how a candle works to a 6-year-old in a few sentences.",
|
|
|
|
| 12 |
"What are some of the most common misconceptions about birds?",
|
| 13 |
+
"Explain why the Rust programming language is so popular.",
|
| 14 |
]
|
| 15 |
|
| 16 |
session_config = SessionConfig(threads=2,batch_size=2)
|
|
|
|
| 36 |
css=".disclaimer {font-variant-caps: all-small-caps;}",
|
| 37 |
) as demo:
|
| 38 |
gr.Markdown(
|
| 39 |
+
"""<h1><center>MPT-7B-Instruct on CPU in Rust 🦀</center></h1>
|
| 40 |
|
| 41 |
+
This demo uses the [rustformers/llm](https://github.com/rustformers/llm) library via [llm-rs](https://github.com/LLukas22/llm-rs-python) to execute [MPT-7B-Instruct](https://huggingface.co/mosaicml/mpt-7b-instruct) on 2 CPU cores.
|
| 42 |
"""
|
| 43 |
)
|
| 44 |
with gr.Row():
|
| 45 |
with gr.Column():
|
| 46 |
with gr.Row():
|
| 47 |
instruction = gr.Textbox(
|
| 48 |
+
placeholder="Enter your question or instruction here",
|
| 49 |
label="Question/Instruction",
|
| 50 |
elem_id="q-input",
|
| 51 |
)
|