Spaces:
Running
Running
Maarten Van Segbroeck
commited on
Commit
•
a444f06
1
Parent(s):
c6db2b5
Update app.py
Browse files
app.py
CHANGED
@@ -167,11 +167,6 @@ def generate_synthetic_records(api_key, pdf_chunks_dict, num_records):
|
|
167 |
except:
|
168 |
return gr.update(value=None, visible=False), None
|
169 |
|
170 |
-
# def generate_and_show_download_button(api_key, pdf_chunks_dict, num_records):
|
171 |
-
# df = generate_synthetic_records(api_key, pdf_chunks_dict, num_records)
|
172 |
-
# csv_file = download_dataframe(df)
|
173 |
-
# return df, gr.update(visible=True), csv_file
|
174 |
-
|
175 |
def download_dataframe(df):
|
176 |
csv_file = os.path.join(output_dir, "synthetic_qa.csv")
|
177 |
df.to_csv(csv_file, index=False)
|
@@ -279,7 +274,7 @@ with gr.Blocks() as demo:
|
|
279 |
gr.Markdown("# Generate Question-Answer pairs")
|
280 |
|
281 |
with gr.Row():
|
282 |
-
api_key_input = gr.Textbox(label="API Key", type="password", placeholder="Enter your API key", scale=2)
|
283 |
validate_status = gr.Textbox(label="Validation Status", interactive=False, scale=1)
|
284 |
|
285 |
# User-specific settings
|
|
|
167 |
except:
|
168 |
return gr.update(value=None, visible=False), None
|
169 |
|
|
|
|
|
|
|
|
|
|
|
170 |
def download_dataframe(df):
|
171 |
csv_file = os.path.join(output_dir, "synthetic_qa.csv")
|
172 |
df.to_csv(csv_file, index=False)
|
|
|
274 |
gr.Markdown("# Generate Question-Answer pairs")
|
275 |
|
276 |
with gr.Row():
|
277 |
+
api_key_input = gr.Textbox(label="Gretel API Key (available at https://console.gretel.ai)", type="password", placeholder="Enter your API key", scale=2)
|
278 |
validate_status = gr.Textbox(label="Validation Status", interactive=False, scale=1)
|
279 |
|
280 |
# User-specific settings
|