Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,18 +13,8 @@ DEFAULT_MAX_NEW_TOKENS = 512
|
|
| 13 |
MAX_INPUT_TOKEN_LENGTH = 4000
|
| 14 |
|
| 15 |
DESCRIPTION = """
|
| 16 |
-
#
|
| 17 |
-
This Space demonstrates model [
|
| 18 |
-
π For more details about the Code Llama family of models and how to use them with `transformers`, take a look [at our blog post](https://huggingface.co/blog/codellama) or [the paper](https://huggingface.co/papers/2308.12950).
|
| 19 |
-
ππ» Check out our [Playground](https://huggingface.co/spaces/codellama/codellama-playground) for a super-fast code completion demo that leverages a streaming [inference endpoint](https://huggingface.co/inference-endpoints).
|
| 20 |
-
πͺ For a chat demo of the largest Code Llama model (34B parameters), you can [select Code Llama in Hugging Chat!](https://huggingface.co/chat/)
|
| 21 |
-
"""
|
| 22 |
-
|
| 23 |
-
LICENSE = """
|
| 24 |
-
<p/>
|
| 25 |
-
---
|
| 26 |
-
As a derivate work of Code Llama by Meta,
|
| 27 |
-
this demo is governed by the original [license](https://huggingface.co/spaces/huggingface-projects/codellama-2-13b-chat/blob/main/LICENSE.txt) and [acceptable use policy](https://huggingface.co/spaces/huggingface-projects/codellama-2-13b-chat/blob/main/USE_POLICY.md).
|
| 28 |
"""
|
| 29 |
|
| 30 |
def clear_and_save_textbox(message: str) -> tuple[str, str]:
|
|
@@ -130,7 +120,7 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 130 |
minimum=0.05,
|
| 131 |
maximum=1.0,
|
| 132 |
step=0.05,
|
| 133 |
-
value=0.
|
| 134 |
)
|
| 135 |
top_k = gr.Slider(
|
| 136 |
label='Top-k',
|
|
@@ -140,8 +130,6 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 140 |
value=10,
|
| 141 |
)
|
| 142 |
|
| 143 |
-
gr.Markdown(LICENSE)
|
| 144 |
-
|
| 145 |
textbox.submit(
|
| 146 |
fn=clear_and_save_textbox,
|
| 147 |
inputs=textbox,
|
|
|
|
| 13 |
MAX_INPUT_TOKEN_LENGTH = 4000
|
| 14 |
|
| 15 |
DESCRIPTION = """
|
| 16 |
+
# StarCoder-base-1b-sft
|
| 17 |
+
This Space demonstrates model [StarCoder-base-1b-sft](https://huggingface.co/abacaj/starcoderbase-1b-sft) by anton Bacaj
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
"""
|
| 19 |
|
| 20 |
def clear_and_save_textbox(message: str) -> tuple[str, str]:
|
|
|
|
| 120 |
minimum=0.05,
|
| 121 |
maximum=1.0,
|
| 122 |
step=0.05,
|
| 123 |
+
value=0.95,
|
| 124 |
)
|
| 125 |
top_k = gr.Slider(
|
| 126 |
label='Top-k',
|
|
|
|
| 130 |
value=10,
|
| 131 |
)
|
| 132 |
|
|
|
|
|
|
|
| 133 |
textbox.submit(
|
| 134 |
fn=clear_and_save_textbox,
|
| 135 |
inputs=textbox,
|