Alexander Watson
commited on
Commit
•
78d62e7
1
Parent(s):
685b5bb
Update app.py
Browse files
app.py
CHANGED
@@ -357,6 +357,23 @@ def main():
|
|
357 |
|
358 |
with st.expander("Download SDK Code", expanded=False):
|
359 |
config_text = f"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
# Create the data augmentation configuration
|
361 |
config = DataAugmentationConfig(
|
362 |
input_fields={st.session_state.selected_fields},
|
@@ -367,7 +384,7 @@ def main():
|
|
367 |
temperature={temperature},
|
368 |
max_tokens_instruction={max_tokens_instruction},
|
369 |
max_tokens_response={max_tokens_response},
|
370 |
-
api_key=
|
371 |
navigator_tabular="{navigator_tabular}",
|
372 |
navigator_llm="{navigator_llm}",
|
373 |
co_teach_llms={co_teach_llms},
|
|
|
357 |
|
358 |
with st.expander("Download SDK Code", expanded=False):
|
359 |
config_text = f"""
|
360 |
+
#!pip install -Uqq git+https://github.com/gretelai/navigator-helpers.git
|
361 |
+
|
362 |
+
import logging
|
363 |
+
import sys
|
364 |
+
import pandas as pd
|
365 |
+
|
366 |
+
from navigator_helpers import DataAugmentationConfig, DataAugmenter
|
367 |
+
|
368 |
+
# Configure the logger
|
369 |
+
logger = logging.getLogger()
|
370 |
+
logger.setLevel(logging.INFO)
|
371 |
+
|
372 |
+
DATASET = "YOUR_DATASET"
|
373 |
+
API_KEY = "YOUR_API_KEY"
|
374 |
+
|
375 |
+
df = pd.read_csv(DATASET)
|
376 |
+
|
377 |
# Create the data augmentation configuration
|
378 |
config = DataAugmentationConfig(
|
379 |
input_fields={st.session_state.selected_fields},
|
|
|
384 |
temperature={temperature},
|
385 |
max_tokens_instruction={max_tokens_instruction},
|
386 |
max_tokens_response={max_tokens_response},
|
387 |
+
api_key=API_KEY,
|
388 |
navigator_tabular="{navigator_tabular}",
|
389 |
navigator_llm="{navigator_llm}",
|
390 |
co_teach_llms={co_teach_llms},
|