jacklangerman commited on
Commit
c38d00f
·
1 Parent(s): dca3e52
Files changed (1) hide show
  1. tok2text.py +0 -36
tok2text.py CHANGED
@@ -58,42 +58,6 @@ def transcribe_audio(audio_file_path):
58
  transcription = f.read()
59
  return transcription
60
 
61
- # def format_recipe(transcript, output_path):
62
- # formatted_recipe_path = output_path / 'formatted_recipe.txt'
63
- # if not formatted_recipe_path.exists():
64
- # # prompt = f"Please format the following recipe transcript into a nicely formatted recipe:\n\n{transcript}"
65
- # # response = client.completions.create(engine="text-davinci-003",
66
- # # prompt=prompt,
67
- # # max_tokens=500,
68
- # # n=1,
69
- # # stop=None,
70
- # # temperature=0.7)
71
- # prompt = f"Transcript: \n\n{transcript}\n\n\nRecipe:\n\nTitle: "
72
- # response = client.completions.create(
73
- # model="davinci-002",
74
- # prompt=prompt,
75
- # max_tokens=500,
76
- # n=1,
77
- # stop=None,
78
- # temperature=0.7,
79
- # stream=False,
80
- # )
81
- # print(response)
82
-
83
-
84
-
85
- # formatted_recipe = response.choices[0].text.strip()
86
- # with formatted_recipe_path.open('w') as f:
87
- # f.write(formatted_recipe)
88
- # else:
89
- # print('Formatted recipe already exists. Skipping formatting.')
90
- # with formatted_recipe_path.open() as f:
91
- # formatted_recipe = f.read()
92
- # return formatted_recipe
93
-
94
-
95
-
96
-
97
  def format_recipe(transcript, output_path, tiktok_url):
98
  formatted_recipe_path = output_path / 'formatted_recipe.txt'
99
  if not formatted_recipe_path.exists():
 
58
  transcription = f.read()
59
  return transcription
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  def format_recipe(transcript, output_path, tiktok_url):
62
  formatted_recipe_path = output_path / 'formatted_recipe.txt'
63
  if not formatted_recipe_path.exists():