Spaces:
Runtime error
Runtime error
Commit
Β·
9904ac6
1
Parent(s):
43deac1
config_device=meta
Browse files
app.py
CHANGED
|
@@ -14,6 +14,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, StoppingCriteria,
|
|
| 14 |
|
| 15 |
|
| 16 |
import config
|
|
|
|
| 17 |
|
| 18 |
INSTRUCTION_KEY = "### Instruction:"
|
| 19 |
RESPONSE_KEY = "### Response:"
|
|
@@ -116,7 +117,7 @@ print (f"sys.path : {sys.path}")
|
|
| 116 |
|
| 117 |
|
| 118 |
def complete(state="complete"):
|
| 119 |
-
print(f"\nCell {state}
|
| 120 |
|
| 121 |
complete(state='imports done')
|
| 122 |
|
|
@@ -193,7 +194,6 @@ def tester(uPrompt, max_new_tokens, temperature, top_k, top_p):
|
|
| 193 |
results = f"{salutation} max_new_tokens{max_new_tokens}; temperature{temperature}; top_k{top_k}; top_p{top_p}; "
|
| 194 |
|
| 195 |
return response
|
| 196 |
-
config.init_device="meta"
|
| 197 |
demo = gr.Interface(
|
| 198 |
fn=tester,
|
| 199 |
inputs=[gr.Textbox(label="Prompt",info="Prompt",lines=3,value="Provide Prompt"),
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
import config
|
| 17 |
+
config.init_device="meta"
|
| 18 |
|
| 19 |
INSTRUCTION_KEY = "### Instruction:"
|
| 20 |
RESPONSE_KEY = "### Response:"
|
|
|
|
| 117 |
|
| 118 |
|
| 119 |
def complete(state="complete"):
|
| 120 |
+
print(f"\nCell {state}")
|
| 121 |
|
| 122 |
complete(state='imports done')
|
| 123 |
|
|
|
|
| 194 |
results = f"{salutation} max_new_tokens{max_new_tokens}; temperature{temperature}; top_k{top_k}; top_p{top_p}; "
|
| 195 |
|
| 196 |
return response
|
|
|
|
| 197 |
demo = gr.Interface(
|
| 198 |
fn=tester,
|
| 199 |
inputs=[gr.Textbox(label="Prompt",info="Prompt",lines=3,value="Provide Prompt"),
|