Update app.py
Browse files
app.py
CHANGED
@@ -19,14 +19,14 @@ class BasicAgent:
|
|
19 |
print("ENV-HF_TOKEN-LEN", len(os.getenv("HF_TOKEN", "")), file=sys.stderr)
|
20 |
|
21 |
# Local test
|
22 |
-
client = InferenceClient(
|
23 |
-
model="
|
24 |
-
token=os.environ["HF_TOKEN"]
|
25 |
-
)
|
26 |
-
print(client.text_generation("Hello, my name is", max_new_tokens=20))
|
27 |
|
28 |
# Initialize the model
|
29 |
-
model = HfApiModel(model_id="
|
30 |
format="text-generation",
|
31 |
token=os.environ["HF_TOKEN"],
|
32 |
max_tokens=2048,
|
|
|
19 |
print("ENV-HF_TOKEN-LEN", len(os.getenv("HF_TOKEN", "")), file=sys.stderr)
|
20 |
|
21 |
# Local test
|
22 |
+
# client = InferenceClient(
|
23 |
+
# model="meta-llama/Llama-3.1-8B-Instruct",
|
24 |
+
# token=os.environ["HF_TOKEN"]
|
25 |
+
# )
|
26 |
+
# print(client.text_generation("Hello, my name is", max_new_tokens=20))
|
27 |
|
28 |
# Initialize the model
|
29 |
+
model = HfApiModel(model_id="meta-llama/Llama-3.1-8B-Instruct",
|
30 |
format="text-generation",
|
31 |
token=os.environ["HF_TOKEN"],
|
32 |
max_tokens=2048,
|