abenkbp commited on
Commit
ec13c9c
·
1 Parent(s): 09233a7
Files changed (1) hide show
  1. data/models/llama3-1-70b.py +2 -2
data/models/llama3-1-70b.py CHANGED
@@ -10,7 +10,7 @@ app = Flask(__name__)
10
  # Load the API key and initialize the InferenceClient
11
  api_key = os.getenv("UCODE_SECRET")
12
  login(api_key)
13
- client = AsyncInferenceClient("meta-llama/Meta-Llama-3.1-70B-Instruct",token=True)
14
 
15
  @app.route('/chat', methods=['POST'])
16
  @spaces.GPU()
@@ -26,7 +26,7 @@ def chat_completion():
26
 
27
  try:
28
  response = ""
29
- response = await client.chat_completion(
30
  user_input,
31
  max_tokens=max_tokens,
32
  stream=False,
 
10
  # Load the API key and initialize the InferenceClient
11
  api_key = os.getenv("UCODE_SECRET")
12
  login(api_key)
13
+ client = InferenceClient("meta-llama/Meta-Llama-3-70B-Instruct")
14
 
15
  @app.route('/chat', methods=['POST'])
16
  @spaces.GPU()
 
26
 
27
  try:
28
  response = ""
29
+ response = client.chat_completion(
30
  user_input,
31
  max_tokens=max_tokens,
32
  stream=False,