simonraj commited on
Commit
80dce9b
β€’
1 Parent(s): b5ee0e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
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: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
22
- <img src="https://cdn-thumbnails.huggingface.co/social-thumbnails/models/microsoft/Phi-3-vision-128k-instruct.png" style="width: 80%; max-width: 550px; height: auto; opacity: 0.55;">
23
- <h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">Fitness Coach: Arnold Style</h1>
24
- <p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Upload your exercise photo and get short, powerful coaching tips from the best!</p>
 
 
 
 
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="Fitness Coach: Arnold Style",
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="Upload an image of your exercise, and the fitness coach will identify the exercise and provide concise coaching cues to improve your form. Responses are limited to 280 characters.",
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,