Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,16 @@ model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cuda", trust_
|
|
17 |
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
|
18 |
model.to("cuda:0")
|
19 |
|
|
|
20 |
PLACEHOLDER = """
|
21 |
-
<div style="padding:
|
22 |
-
<
|
23 |
-
<
|
24 |
-
<
|
|
|
|
|
|
|
|
|
25 |
</div>
|
26 |
"""
|
27 |
|
@@ -83,14 +88,14 @@ chat_input = gr.MultimodalTextbox(interactive=True, file_types=["image"], placeh
|
|
83 |
with gr.Blocks(fill_height=True,) as demo:
|
84 |
gr.ChatInterface(
|
85 |
fn=bot_streaming,
|
86 |
-
title="
|
87 |
examples=[
|
88 |
{"text": "Identify and provide coaching cues for this exercise.", "files": ["./squat.jpg"]},
|
89 |
{"text": "What improvements can I make?", "files": ["./pushup.jpg"]},
|
90 |
{"text": "How is my form?", "files": ["./plank.jpg"]},
|
91 |
{"text": "Give me some tips to improve my deadlift.", "files": ["./deadlift.jpg"]}
|
92 |
],
|
93 |
-
description="
|
94 |
stop_btn="Stop Generation",
|
95 |
multimodal=True,
|
96 |
textbox=chat_input,
|
|
|
17 |
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
|
18 |
model.to("cuda:0")
|
19 |
|
20 |
+
# Enhanced Placeholder HTML with instructions
|
21 |
PLACEHOLDER = """
|
22 |
+
<div style="padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
23 |
+
<h1 style="font-size: 32px; margin-bottom: 10px;">Get Ripped with Arnold's AI Coach</h1>
|
24 |
+
<p style="font-size: 18px; margin-bottom: 5px;">Welcome to the ultimate fitness companion! πͺ</p>
|
25 |
+
<ul style="text-align: left; font-size: 16px;">
|
26 |
+
<li>πΈ <strong>Upload</strong> a photo of your exercise.</li>
|
27 |
+
<li>β‘ <strong>Get instant feedback</strong> to perfect your form.</li>
|
28 |
+
<li>π₯ <strong>Improve your workouts</strong> with expert tips!</li>
|
29 |
+
</ul>
|
30 |
</div>
|
31 |
"""
|
32 |
|
|
|
88 |
with gr.Blocks(fill_height=True,) as demo:
|
89 |
gr.ChatInterface(
|
90 |
fn=bot_streaming,
|
91 |
+
title="Get Ripped with Arnold's AI Coach",
|
92 |
examples=[
|
93 |
{"text": "Identify and provide coaching cues for this exercise.", "files": ["./squat.jpg"]},
|
94 |
{"text": "What improvements can I make?", "files": ["./pushup.jpg"]},
|
95 |
{"text": "How is my form?", "files": ["./plank.jpg"]},
|
96 |
{"text": "Give me some tips to improve my deadlift.", "files": ["./deadlift.jpg"]}
|
97 |
],
|
98 |
+
description="Welcome to the ultimate fitness companion! πͺ\nUpload a photo of your exercise and get instant feedback to perfect your form. Improve your workouts with expert tips!",
|
99 |
stop_btn="Stop Generation",
|
100 |
multimodal=True,
|
101 |
textbox=chat_input,
|