ysharma HF staff commited on
Commit
9c37fd7
1 Parent(s): 4c0e317
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -34,7 +34,7 @@ prompt3 = """Q: A juggler can juggle 16 balls. Half of the balls are golf balls,
34
  A: Let’s think step by step.
35
  """
36
  #Complete below sentence in fun way.
37
- prompt = """Distracted from: hubble
38
  by: james webb
39
  Distracted from: homework
40
  by: side project
@@ -54,7 +54,7 @@ def write_on_image(final_solution):
54
  I1.text((142, 336), "new girl",font=myfont, fill =(255, 255, 255))
55
  return image0
56
 
57
- def meme_generate(img): #prompt, generated_txt): #, input_prompt_sql ): #, input_prompt_dalle2):
58
 
59
  print(f"*****Inside meme_generate - Prompt is :{prompt}")
60
  json_ = {"inputs": prompt,
@@ -115,7 +115,7 @@ with demo:
115
 
116
  #with gr.Row():
117
  in_image = gr.Image(value="./distracted0.jpg")
118
- #input_prompt = gr.Textbox(label="Write some text to get started...", lines=3) #input_prompt_sql
119
  #input_prompt_dalle2 = gr.Textbox(label="Or Write sample Dalle2 prompts to get more Prompt ideas...")
120
  #input_prompt2 = gr.Textbox(label="Write some text to get started...", lines=3, visible=False) #input_prompt_sql
121
 
@@ -127,7 +127,7 @@ with demo:
127
  b1 = gr.Button("Generate")
128
  #b2 = gr.Button("Generate Image")
129
 
130
- b1.click(meme_generate, inputs=in_image, outputs=output_image) #input_word #input_prompt_dalle2 #input_prompt_sql #example_prompt
131
  #b2.click(poem_to_image, poem_txt, output_image)
132
  #examples=examples
133
 
 
34
  A: Let’s think step by step.
35
  """
36
  #Complete below sentence in fun way.
37
+ prompt4 = """Distracted from: hubble
38
  by: james webb
39
  Distracted from: homework
40
  by: side project
 
54
  I1.text((142, 336), "new girl",font=myfont, fill =(255, 255, 255))
55
  return image0
56
 
57
+ def meme_generate(img, prompt): #prompt, generated_txt): #, input_prompt_sql ): #, input_prompt_dalle2):
58
 
59
  print(f"*****Inside meme_generate - Prompt is :{prompt}")
60
  json_ = {"inputs": prompt,
 
115
 
116
  #with gr.Row():
117
  in_image = gr.Image(value="./distracted0.jpg")
118
+ input_prompt = gr.Textbox(label="Write some prompt...", lines=5) #input_prompt_sql
119
  #input_prompt_dalle2 = gr.Textbox(label="Or Write sample Dalle2 prompts to get more Prompt ideas...")
120
  #input_prompt2 = gr.Textbox(label="Write some text to get started...", lines=3, visible=False) #input_prompt_sql
121
 
 
127
  b1 = gr.Button("Generate")
128
  #b2 = gr.Button("Generate Image")
129
 
130
+ b1.click(meme_generate, inputs=[in_image, input_prompt], outputs=output_image) #input_word #input_prompt_dalle2 #input_prompt_sql #example_prompt
131
  #b2.click(poem_to_image, poem_txt, output_image)
132
  #examples=examples
133