jer233 commited on
Commit
5f71889
·
verified ·
1 Parent(s): 28e01d0

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +16 -0
demo.py CHANGED
@@ -52,6 +52,20 @@ css = """
52
  width: 250px; /* Set all elements to the same width */
53
  margin: 5px;
54
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  """
56
 
57
  # Gradio App
@@ -73,11 +87,13 @@ with gr.Blocks(css=css) as app:
73
  label="Input Text",
74
  placeholder="Enter Text Here",
75
  lines=8,
 
76
  )
77
  output = gr.Textbox(
78
  label="Inference Result",
79
  placeholder="Made by Human or AI",
80
  elem_id="output-text",
 
81
  )
82
  with gr.Row():
83
  model_name = gr.Dropdown(
 
52
  width: 250px; /* Set all elements to the same width */
53
  margin: 5px;
54
  }
55
+ /* Adjusting layout for Input Text and Inference Result */
56
+ .input-row {
57
+ display: flex;
58
+ width: 100%;
59
+ }
60
+
61
+ .input-text {
62
+ flex: 4; /* 4 parts of the row */
63
+ margin-right: 10px; /* Space between the boxes */
64
+ }
65
+
66
+ .output-text {
67
+ flex: 1; /* 1 part of the row */
68
+ }
69
  """
70
 
71
  # Gradio App
 
87
  label="Input Text",
88
  placeholder="Enter Text Here",
89
  lines=8,
90
+ elem_classes=["input-text"],
91
  )
92
  output = gr.Textbox(
93
  label="Inference Result",
94
  placeholder="Made by Human or AI",
95
  elem_id="output-text",
96
+ elem_classes=["output-text"]
97
  )
98
  with gr.Row():
99
  model_name = gr.Dropdown(