debug
Browse files
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 =
|
| 14 |
|
| 15 |
@app.route('/chat', methods=['POST'])
|
| 16 |
@spaces.GPU()
|
|
@@ -26,7 +26,7 @@ def chat_completion():
|
|
| 26 |
|
| 27 |
try:
|
| 28 |
response = ""
|
| 29 |
-
response =
|
| 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,
|