research14 commited on
Commit
83c4c0e
·
1 Parent(s): 1f72636

revert changes

Browse files
Files changed (1) hide show
  1. app.py +20 -15
app.py CHANGED
@@ -1,26 +1,31 @@
1
  import gradio as gr
2
 
 
3
  def echo_text(input_text):
4
  return input_text
5
 
6
- # Custom HTML layout for input and output
7
- custom_interface = """
8
- <div style="text-align: center;">
9
- <label for="io-text">Input Text:</label><br>
10
- <textarea id="io-text" name="io_text" rows="5" cols="40" style="width: 80%;"></textarea>
11
- </div>
12
- <script>
13
- document.getElementById("io-text").addEventListener("input", function() {
14
- this.value = this.value;
15
- });
16
- </script>
17
  """
18
 
19
  iface = gr.Interface(
20
  fn=echo_text,
21
- inputs=gr.HTML(custom_interface), # Use custom HTML interface
22
- outputs=gr.Textbox("Output will be displayed here.", type="text"),
23
- live=True
 
 
 
 
24
  )
25
 
26
- iface.launch()
 
1
  import gradio as gr
2
 
3
+ # Define a function that echoes the input text
4
  def echo_text(input_text):
5
  return input_text
6
 
7
+ custom_css = """
8
+ .gr-textbox {
9
+ background-color: rgb(79, 129, 145);
10
+ color: #333;
11
+ font-size: 16px;
12
+ border: 2px solid #666;
13
+ padding: 10px;
14
+ }
15
+ .gr-textbox:focus {
16
+ border: 2px solid #009688;
17
+ }
18
  """
19
 
20
  iface = gr.Interface(
21
  fn=echo_text,
22
+ inputs=gr.Textbox(text="Enter text here...", style=custom_css),
23
+ outputs=gr.Textbox(style=custom_css),
24
+ live=True,
25
+ title="LLM Evaluator with Linguistic Scrutiny",
26
+ width=500,
27
+ height=200,
28
+ theme="dark" # You can use "dark" for a dark theme
29
  )
30
 
31
+ iface.launch()