LPX commited on
Commit
f54d46f
·
1 Parent(s): af8c793
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -1,5 +1,7 @@
1
  import spaces
2
  import gradio as gr
 
 
3
  from transformers import pipeline, AutoImageProcessor, SwinForImageClassification, Swinv2ForImageClassification, AutoFeatureExtractor, AutoModelForImageClassification
4
  from torchvision import transforms
5
  import torch
@@ -304,18 +306,17 @@ with gr.Blocks(css="#post-gallery { overflow: hidden !important;} .grid-wrap{ ov
304
 
305
  with gr.Tab("🥇 Leaderboard"):
306
  # Add components for the second interface here
307
- gr.Markdown("# Another Interface")
308
- with gr.Sidebar():
309
- gr.Markdown("# Another Interface")
310
- # Example: Add a simple text input and output
311
- text_input = gr.Textbox(label="Enter Text")
312
- text_output = gr.Textbox(label="Processed Text")
313
- text_button = gr.Button("Process Text")
314
- text_button.click(
315
- fn=lambda x: x.upper(), # Example function to convert text to uppercase
316
- inputs=text_input,
317
- outputs=text_output
318
- )
319
 
320
  # Launch the interface
321
  iface.launch()
 
1
  import spaces
2
  import gradio as gr
3
+ import modelscope_studio.components.antd as antd
4
+ import modelscope_studio.components.base as ms
5
  from transformers import pipeline, AutoImageProcessor, SwinForImageClassification, Swinv2ForImageClassification, AutoFeatureExtractor, AutoModelForImageClassification
6
  from torchvision import transforms
7
  import torch
 
306
 
307
  with gr.Tab("🥇 Leaderboard"):
308
  # Add components for the second interface here
309
+ with ms.Application() as app:
310
+ with antd.ConfigProvider():
311
+ # Example: Add a simple text input and output
312
+ text_input = gr.Textbox(label="Enter Text")
313
+ text_output = gr.Textbox(label="Processed Text")
314
+ text_button = gr.Button("Process Text")
315
+ text_button.click(
316
+ fn=lambda x: x.upper(), # Example function to convert text to uppercase
317
+ inputs=text_input,
318
+ outputs=text_output
319
+ )
 
320
 
321
  # Launch the interface
322
  iface.launch()