Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
·
fcd5d54
1
Parent(s):
72d2c17
type cast
Browse files
app.py
CHANGED
@@ -17,14 +17,17 @@ def create_fractal_noise(input_seed,input_size,res,n_octaves,persistence):
|
|
17 |
n3=np.repeat(n[:,:,np.newaxis],3,axis=2)
|
18 |
#change from [-1,1] to [0,255]
|
19 |
n3=(n3+1)/2*255
|
|
|
|
|
20 |
return n3
|
21 |
|
22 |
demo = gr.Blocks()
|
23 |
|
24 |
with demo:
|
25 |
-
gr.Markdown("<h1><center>
|
26 |
gr.Markdown(
|
27 |
"<div>Create fractal-like noise (useful for map generation and such)</div>"
|
|
|
28 |
)
|
29 |
|
30 |
|
|
|
17 |
n3=np.repeat(n[:,:,np.newaxis],3,axis=2)
|
18 |
#change from [-1,1] to [0,255]
|
19 |
n3=(n3+1)/2*255
|
20 |
+
#change type to int64
|
21 |
+
n3=n3.astype(np.int64)
|
22 |
return n3
|
23 |
|
24 |
demo = gr.Blocks()
|
25 |
|
26 |
with demo:
|
27 |
+
gr.Markdown("<h1><center>fractalNoise</center></h1>")
|
28 |
gr.Markdown(
|
29 |
"<div>Create fractal-like noise (useful for map generation and such)</div>"
|
30 |
+
"<div>Using pvigier's <a href=https://github.com/pvigier/perlin-numpy>perlin-numpy</a></div>"
|
31 |
)
|
32 |
|
33 |
|