Spaces:
Runtime error
Runtime error
Commit
Β·
636588b
1
Parent(s):
62bb2f6
add examples to install and use local
Browse files- examples/ollama_local.py +10 -0
- examples/openai_local.py +11 -0
examples/ollama_local.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# pip install synthetic-dataset-generator
|
2 |
+
import os
|
3 |
+
|
4 |
+
from synthetic_dataset_generator.app import demo
|
5 |
+
|
6 |
+
assert os.getenv("HF_TOKEN")
|
7 |
+
os.environ["BASE_URL"] = "http://127.0.0.1:11434/v1/"
|
8 |
+
os.environ["MODEL"] = "llama3.1"
|
9 |
+
|
10 |
+
demo.launch()
|
examples/openai_local.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# pip install synthetic-dataset-generator
|
2 |
+
import os
|
3 |
+
|
4 |
+
from synthetic_dataset_generator.app import demo
|
5 |
+
|
6 |
+
assert os.getenv("HF_TOKEN")
|
7 |
+
os.environ["BASE_URL"] = "https://api.openai.com/v1/"
|
8 |
+
os.environ["API_KEY"] = os.getenv("OPENAI_API_KEY")
|
9 |
+
os.environ["MODEL"] = "gpt-4o"
|
10 |
+
|
11 |
+
demo.launch()
|