ysharma HF staff commited on
Commit
1f43a97
1 Parent(s): ce4a26c

updated app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -16
app.py CHANGED
@@ -2,24 +2,23 @@ import gradio as gr
2
 
3
  # GPT-J-6B API
4
  API_URL = "https://api-inference.huggingface.co/models/EleutherAI/gpt-j-6B"
5
- prompt = """
6
- word: risk
7
- poem using word: And then the day came,
8
- when the risk
9
- to remain tight
10
- in a bud
11
- was more painful
12
- than the risk
13
- it took
14
- to blossom.
15
-
16
- word: """
17
-
18
- text = "A few clouded the sun, not enough to cloud the sky, not enough to bring a cloud, not enough to bring a storm"
19
- steps, width, height, images, diversity = '50','256','256','1',15
20
- gr.Interface.load("spaces/multimodalart/latentdiffusion")(text, steps, width, height, images, diversity)[0]
21
 
22
  def poem_generate(word):
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  prompt = prompt + word + "\n" + "poem using word: "
24
  json_ = {"inputs": prompt,
25
  "parameters":
 
2
 
3
  # GPT-J-6B API
4
  API_URL = "https://api-inference.huggingface.co/models/EleutherAI/gpt-j-6B"
5
+
6
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  def poem_generate(word):
9
+ prompt = """
10
+ word: risk
11
+ poem using word: And then the day came,
12
+ when the risk
13
+ to remain tight
14
+ in a bud
15
+ was more painful
16
+ than the risk
17
+ it took
18
+ to blossom.
19
+
20
+ word: """
21
+
22
  prompt = prompt + word + "\n" + "poem using word: "
23
  json_ = {"inputs": prompt,
24
  "parameters":