Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
import gradio as gr
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
4 |
import spaces
|
@@ -64,20 +64,9 @@ def generate_kids_story(character, setting, language):
|
|
64 |
gc.collect ()
|
65 |
# Empty CUDA cache
|
66 |
torch.cuda.empty_cache()
|
67 |
-
|
68 |
|
69 |
return output[0]["generated_text"]
|
70 |
|
71 |
-
css_style = """
|
72 |
-
body {
|
73 |
-
background-image: url('https://cdna.artstation.com/p/assets/images/images/074/776/904/large/pietro-chiovaro-r1-castle-chp.jpg?1712916847');
|
74 |
-
background-size: cover;
|
75 |
-
background-position: center;
|
76 |
-
color: #fff; /* General text color */
|
77 |
-
font-family: 'Arial', sans-serif;
|
78 |
-
}
|
79 |
-
"""
|
80 |
-
|
81 |
# Create Gradio interface
|
82 |
demo = gr.Interface(
|
83 |
fn=generate_kids_story,
|
@@ -99,7 +88,7 @@ demo = gr.Interface(
|
|
99 |
["Lila the Ladybug", "a garden full of flowers", "English"],
|
100 |
["ليلى الجنية", "حديقة مليئة بالأزهار", "Arabic"]
|
101 |
],
|
102 |
-
|
103 |
)
|
104 |
|
105 |
# Launch the Gradio app
|
|
|
1 |
+
|
2 |
import gradio as gr
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
4 |
import spaces
|
|
|
64 |
gc.collect ()
|
65 |
# Empty CUDA cache
|
66 |
torch.cuda.empty_cache()
|
|
|
67 |
|
68 |
return output[0]["generated_text"]
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
# Create Gradio interface
|
71 |
demo = gr.Interface(
|
72 |
fn=generate_kids_story,
|
|
|
88 |
["Lila the Ladybug", "a garden full of flowers", "English"],
|
89 |
["ليلى الجنية", "حديقة مليئة بالأزهار", "Arabic"]
|
90 |
],
|
91 |
+
theme = de,fault,
|
92 |
)
|
93 |
|
94 |
# Launch the Gradio app
|