adrianpierce commited on
Commit
150235f
1 Parent(s): 2610228

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import re
5
  import json
6
  from openai import OpenAI
7
  import secrets
 
8
 
9
  client = OpenAI(
10
  api_key = st.secrets["open_ai_key"]
@@ -212,7 +213,7 @@ if st.session_state.gpt_response is not None:
212
  recipe_md += f"{instruction['step_number']}. {instruction['instruction']} \n"
213
  recipe['md'] = recipe_md
214
  st.markdown(recipe_md)
215
- st.button("📋", on_click=on_copy_click, args=(recipe_md,))
216
  # write to file
217
  # filename = create_safe_filename(recipe["name"])
218
  # with open(f"/data/generated/{filename}.json", "w") as f:
 
5
  import json
6
  from openai import OpenAI
7
  import secrets
8
+ import clipboard
9
 
10
  client = OpenAI(
11
  api_key = st.secrets["open_ai_key"]
 
213
  recipe_md += f"{instruction['step_number']}. {instruction['instruction']} \n"
214
  recipe['md'] = recipe_md
215
  st.markdown(recipe_md)
216
+ st.button("Copy to Clipboard", on_click=on_copy_click, args=(recipe_md,))
217
  # write to file
218
  # filename = create_safe_filename(recipe["name"])
219
  # with open(f"/data/generated/{filename}.json", "w") as f: