ysharma HF staff commited on
Commit
578f72e
1 Parent(s): f6218c0
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -25,7 +25,7 @@ headers = {"Authorization": "Bearer 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"}
25
  #She runs without the look of feet
26
  #Her eyes increase to Balls.
27
 
28
- prompt = """
29
  word: risk
30
  poem using word: And then the day came,
31
  when the risk
@@ -37,12 +37,17 @@ it took
37
  to blossom.
38
  word: """
39
 
 
 
 
 
40
  examples = [["river"], ["night"], ["trees"],["table"],["laughs"]]
41
 
42
 
43
  def poem_generate(word):
44
 
45
- p = prompt + word.lower() + "\n" + "poem using word: "
 
46
  print(f"*****Inside poem_generate - Prompt is :{p}")
47
  json_ = {"inputs": p,
48
  "parameters":
@@ -87,7 +92,7 @@ with demo:
87
  """Testing Bloom """
88
  )
89
  with gr.Row():
90
- input_word = gr.Textbox(placeholder="Enter a word here to create a Poem on..")
91
  poem_txt = gr.Textbox(lines=7)
92
  #output_image = gr.Image(type="filepath", shape=(256,256))
93
 
 
25
  #She runs without the look of feet
26
  #Her eyes increase to Balls.
27
 
28
+ prompt1 = """
29
  word: risk
30
  poem using word: And then the day came,
31
  when the risk
 
37
  to blossom.
38
  word: """
39
 
40
+ prompt = """
41
+ Q: A juggler can juggle 16 balls. Half of the balls are golf balls, and half of the golf balls are blue. How many blue golf balls are there?
42
+ A: The answer (arabic numerals) is"""
43
+
44
  examples = [["river"], ["night"], ["trees"],["table"],["laughs"]]
45
 
46
 
47
  def poem_generate(word):
48
 
49
+ #p = prompt + word.lower() + "\n" + "poem using word: "
50
+ p = prompt + word.lower()
51
  print(f"*****Inside poem_generate - Prompt is :{p}")
52
  json_ = {"inputs": p,
53
  "parameters":
 
92
  """Testing Bloom """
93
  )
94
  with gr.Row():
95
+ input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
96
  poem_txt = gr.Textbox(lines=7)
97
  #output_image = gr.Image(type="filepath", shape=(256,256))
98