Chandima Prabhath commited on
Commit
0ffceca
·
1 Parent(s): 4beb4cc

Comment out example usage in main block for both FLUX.py and VoiceReply.py

Browse files
Files changed (2) hide show
  1. FLUX.py +15 -15
  2. VoiceReply.py +10 -10
FLUX.py CHANGED
@@ -127,21 +127,21 @@ def generate_image(prompt, request_id, current_request_id, image_dir, attempt=0)
127
 
128
  return image, image_path, returned_prompt, image_url
129
 
130
- if __name__ == "__main__":
131
- from dotenv import load_dotenv
132
 
133
- load_dotenv()
134
- # Example usage
135
- prompt = "Beach party, anime style, vibrant colors"
136
- request_id = 1
137
- current_request_id = 1
138
- image_dir = "./images"
139
 
140
- image, image_path, returned_prompt, image_url = generate_image(prompt, request_id, current_request_id, image_dir)
141
 
142
- if image:
143
- print(f"Image generated and saved at {image_path}")
144
- print(f"Returned prompt: {returned_prompt}")
145
- print(f"Image URL: {image_url}")
146
- else:
147
- print("Failed to generate image.")
 
127
 
128
  return image, image_path, returned_prompt, image_url
129
 
130
+ # if __name__ == "__main__":
131
+ # from dotenv import load_dotenv
132
 
133
+ # load_dotenv()
134
+ # # Example usage
135
+ # prompt = "Beach party, anime style, vibrant colors"
136
+ # request_id = 1
137
+ # current_request_id = 1
138
+ # image_dir = "./images"
139
 
140
+ # image, image_path, returned_prompt, image_url = generate_image(prompt, request_id, current_request_id, image_dir)
141
 
142
+ # if image:
143
+ # print(f"Image generated and saved at {image_path}")
144
+ # print(f"Returned prompt: {returned_prompt}")
145
+ # print(f"Image URL: {image_url}")
146
+ # else:
147
+ # print("Failed to generate image.")
VoiceReply.py CHANGED
@@ -63,15 +63,15 @@ def generate_voice_reply(prompt, model="openai-audio", voice="coral", audio_dir=
63
 
64
  return audio_file_path, audio_data
65
 
66
- if __name__ == "__main__":
67
- # Example usage
68
- prompt = "Hi. how are you."
69
- audio_dir = "./audio_replies"
70
 
71
 
72
- result = generate_voice_reply(prompt, audio_dir=audio_dir)
73
- if result:
74
- audio_file_path, audio_data = result
75
- print(f"DEBUG: Generated audio file: {audio_file_path}")
76
- else:
77
- print("DEBUG: Failed to generate audio file.")
 
63
 
64
  return audio_file_path, audio_data
65
 
66
+ # if __name__ == "__main__":
67
+ # # Example usage
68
+ # prompt = "Hi. how are you."
69
+ # audio_dir = "./audio_replies"
70
 
71
 
72
+ # result = generate_voice_reply(prompt, audio_dir=audio_dir)
73
+ # if result:
74
+ # audio_file_path, audio_data = result
75
+ # print(f"DEBUG: Generated audio file: {audio_file_path}")
76
+ # else:
77
+ # print("DEBUG: Failed to generate audio file.")