davidberenstein1957 HF staff commited on
Commit
636588b
Β·
1 Parent(s): 62bb2f6

add examples to install and use local

Browse files
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()