Spaces:
Build error
Build error
update instruct to use gpu, add verbose description
Browse files- instruct.py +9 -4
instruct.py
CHANGED
@@ -12,15 +12,20 @@ fp = hf_hub_download(
|
|
12 |
llm = Llama(model_path=fp)
|
13 |
|
14 |
def generate_text(input_text):
|
15 |
-
output = llm(f"### Instruction: {input_text}\n\n### Response: ",
|
16 |
return output['choices'][0]['text']
|
17 |
|
18 |
input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
|
19 |
output_text = gr.outputs.Textbox(label="Output text")
|
20 |
|
21 |
-
description = f"""
|
22 |
-
|
23 |
-
This is the {config["repo"]}/{config["
|
|
|
|
|
|
|
|
|
|
|
24 |
"""
|
25 |
|
26 |
gr.Interface(
|
|
|
12 |
llm = Llama(model_path=fp)
|
13 |
|
14 |
def generate_text(input_text):
|
15 |
+
output = llm(f"### Instruction: {input_text}\n\n### Response: ", stop=["</s>", "<unk>", "### Instruction:"], echo=True, **config['chat'])
|
16 |
return output['choices'][0]['text']
|
17 |
|
18 |
input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
|
19 |
output_text = gr.outputs.Textbox(label="Output text")
|
20 |
|
21 |
+
description = f"""
|
22 |
+
### brought to you by OpenAccess AI Collective
|
23 |
+
- This is the [{config["repo"]}](https://huggingface.co/{config["repo"]}) model file [{config["file"]}](https://huggingface.co/{config["repo"]}/blob/main/{config["file"]})
|
24 |
+
- This Space uses GGML with GPU support, so it can quickly run larger models on smaller GPUs & VRAM.
|
25 |
+
- This is running on a smaller, shared GPU, so it may take a few seconds to respond.
|
26 |
+
- [Duplicate the Space](https://huggingface.co/spaces/openaccess-ai-collective/ggml-ui?duplicate=true) to skip the queue and run in a private space or to use your own GGML models.
|
27 |
+
- When using your own models, simply update the [config.yml](https://huggingface.co/spaces/openaccess-ai-collective/ggml-ui/blob/main/config.yml)")
|
28 |
+
- Contribute at [https://github.com/OpenAccess-AI-Collective/ggml-webui](https://github.com/OpenAccess-AI-Collective/ggml-webui)
|
29 |
"""
|
30 |
|
31 |
gr.Interface(
|