Viglong commited on
Commit
2083e51
·
verified ·
1 Parent(s): 83100ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -55,11 +55,26 @@ example_files = os.listdir('examples')
55
  example_files.sort()
56
  example_files = [[os.path.join('examples', filename), None, None] for filename in example_files]
57
  print(example_files)
 
 
 
 
 
 
 
 
 
 
 
58
  server = gr.Interface(
59
  flagging_mode='never',
60
  fn=infer_func,
61
  examples=example_files,
62
  cache_examples=False,
 
 
 
 
63
  inputs=[
64
  gr.Image(height=512, width=512, label="upload your image"),
65
  gr.Checkbox(label="Remove Background", value=True),
@@ -67,7 +82,6 @@ server = gr.Interface(
67
  ],
68
  outputs=[
69
  gr.Image(height=512, width=512, label="result image"),
70
- # gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
71
  gr.Textbox(lines=1, label='Azimuth(0~360°) represents the position of the viewer in the xy plane'),
72
  gr.Textbox(lines=1, label='Polar(-90~90°) indicating the height at which the viewer is located'),
73
  gr.Textbox(lines=1, label='Rotation(-90~90°) represents the angle of rotation of the viewer'),
 
55
  example_files.sort()
56
  example_files = [[os.path.join('examples', filename), None, None] for filename in example_files]
57
  print(example_files)
58
+
59
+ description_html = """
60
+ <div style="text-align: center; font-size: 1.1em; padding: 15px; background: linear-gradient(90deg, #e3f2fd, #ffffff, #e3f2fd); border: 1px solid #bbdefb; border-radius: 8px; margin-bottom: 20px;">
61
+ 🚀 <b>New Release:</b> Try our latest
62
+ <a href="https://huggingface.co/spaces/Viglong/Orient-Anything-V2" target="_blank" style="color: #1976d2; font-weight: bold; text-decoration: underline;">
63
+ Orient-Anything-V2
64
+ </a>
65
+ for Unifying Orientation and Rotation Understanding!
66
+ </div>
67
+ """
68
+
69
  server = gr.Interface(
70
  flagging_mode='never',
71
  fn=infer_func,
72
  examples=example_files,
73
  cache_examples=False,
74
+ # --- 将标语添加到这里 ---
75
+ title="Orient-Anything",
76
+ description=description_html,
77
+ # -----------------------
78
  inputs=[
79
  gr.Image(height=512, width=512, label="upload your image"),
80
  gr.Checkbox(label="Remove Background", value=True),
 
82
  ],
83
  outputs=[
84
  gr.Image(height=512, width=512, label="result image"),
 
85
  gr.Textbox(lines=1, label='Azimuth(0~360°) represents the position of the viewer in the xy plane'),
86
  gr.Textbox(lines=1, label='Polar(-90~90°) indicating the height at which the viewer is located'),
87
  gr.Textbox(lines=1, label='Rotation(-90~90°) represents the angle of rotation of the viewer'),