Spaces:
Sleeping
Sleeping
Moiz
commited on
Commit
·
1c16e20
1
Parent(s):
a2f6f40
added slider styles
Browse files
app.py
CHANGED
@@ -8,13 +8,14 @@ def rate_movie(movie_name, rating):
|
|
8 |
return f"You rated '{movie_name}' a {rating}/10."
|
9 |
|
10 |
# Gradio interface
|
11 |
-
with gr.Blocks() as app:
|
12 |
gr.Markdown("# Movie Rating App")
|
13 |
movie_name = gr.Textbox(label="Movie Name", placeholder="Enter the movie name...")
|
14 |
rating = gr.Slider(
|
15 |
minimum=0,
|
16 |
maximum=10,
|
17 |
-
step
|
|
|
18 |
)
|
19 |
submit = gr.Button("Submit Rating")
|
20 |
output = gr.Textbox(label="Your Feedback")
|
|
|
8 |
return f"You rated '{movie_name}' a {rating}/10."
|
9 |
|
10 |
# Gradio interface
|
11 |
+
with gr.Blocks(css="styles.css") as app:
|
12 |
gr.Markdown("# Movie Rating App")
|
13 |
movie_name = gr.Textbox(label="Movie Name", placeholder="Enter the movie name...")
|
14 |
rating = gr.Slider(
|
15 |
minimum=0,
|
16 |
maximum=10,
|
17 |
+
step=0.25,
|
18 |
+
elem_id="custom-slider" # Add a custom ID
|
19 |
)
|
20 |
submit = gr.Button("Submit Rating")
|
21 |
output = gr.Textbox(label="Your Feedback")
|