Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import gradio as gr
|
|
10 |
|
11 |
token = os.getenv("HUGGINGFACE_API_TOKEN")
|
12 |
|
13 |
-
print(f'HUGGINGFACE_API_TOKEN {token}')
|
14 |
|
15 |
pipe = pipeline("text-generation", "meta-llama/Meta-Llama-3-8B-Instruct", torch_dtype=torch.bfloat16, device_map="auto", token=token)
|
16 |
|
@@ -20,6 +20,7 @@ pipe = pipeline("text-generation", "meta-llama/Meta-Llama-3-8B-Instruct", torch_
|
|
20 |
def generate(prompt):
|
21 |
response = pipe(prompt, max_new_tokens=512)
|
22 |
# r = response[0]['generated_text'][-1]['content']
|
|
|
23 |
r = response[0]['generated_text']
|
24 |
return r
|
25 |
|
|
|
10 |
|
11 |
token = os.getenv("HUGGINGFACE_API_TOKEN")
|
12 |
|
13 |
+
print(f'HUGGINGFACE_API_TOKEN: {token}')
|
14 |
|
15 |
pipe = pipeline("text-generation", "meta-llama/Meta-Llama-3-8B-Instruct", torch_dtype=torch.bfloat16, device_map="auto", token=token)
|
16 |
|
|
|
20 |
def generate(prompt):
|
21 |
response = pipe(prompt, max_new_tokens=512)
|
22 |
# r = response[0]['generated_text'][-1]['content']
|
23 |
+
print(f'response!')
|
24 |
r = response[0]['generated_text']
|
25 |
return r
|
26 |
|