Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import os
|
|
2 |
import gradio as gr
|
3 |
from huggingface_hub import login
|
4 |
from huggingface_hub import InferenceClient
|
|
|
5 |
|
6 |
# Retrieve API key and authenticate
|
7 |
api_key = os.getenv("LLAMA")
|
@@ -10,6 +11,7 @@ login(api_key)
|
|
10 |
# Initialize InferenceClient for the Llama model
|
11 |
client = InferenceClient("meta-llama/Llama-3.1-70B-Instruct")
|
12 |
|
|
|
13 |
def respond(
|
14 |
message,
|
15 |
history: list[dict],
|
|
|
2 |
import gradio as gr
|
3 |
from huggingface_hub import login
|
4 |
from huggingface_hub import InferenceClient
|
5 |
+
import spaces
|
6 |
|
7 |
# Retrieve API key and authenticate
|
8 |
api_key = os.getenv("LLAMA")
|
|
|
11 |
# Initialize InferenceClient for the Llama model
|
12 |
client = InferenceClient("meta-llama/Llama-3.1-70B-Instruct")
|
13 |
|
14 |
+
@spaces.GPU
|
15 |
def respond(
|
16 |
message,
|
17 |
history: list[dict],
|