SHAH-MEER commited on
Commit
714021c
·
verified ·
1 Parent(s): 34c079c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -151,10 +151,6 @@ def execute_cpp(code):
151
  return f"C++ execution exception:\n{e}"
152
 
153
  # UI setup
154
- css = """
155
- .python {background-color: #306998;}
156
- .cpp {background-color: #050;}
157
- """
158
 
159
  example_code = """
160
  ######-----------------------------------------------#######
@@ -181,11 +177,11 @@ print(f"Result: {result:.12f}")
181
  print(f"Execution Time: {(end_time - start_time):.6f} seconds")
182
  """
183
 
184
- with gr.Blocks(css=css) as ui:
185
  gr.Markdown("## 🔁 Python to C++ Converter")
186
  with gr.Row():
187
- python = gr.Textbox(label="Python code:", value=example_code, lines=12)
188
- cpp = gr.Textbox(label="C++ code:", lines=12)
189
  with gr.Row():
190
  model = gr.Dropdown(["GPT", "Claude", "DeepSeek"], label="Select model", value="Claude")
191
  with gr.Row():
 
151
  return f"C++ execution exception:\n{e}"
152
 
153
  # UI setup
 
 
 
 
154
 
155
  example_code = """
156
  ######-----------------------------------------------#######
 
177
  print(f"Execution Time: {(end_time - start_time):.6f} seconds")
178
  """
179
 
180
+ with gr.Blocks(title="Code Converter",theme=gr.themes.Soft()) as ui:
181
  gr.Markdown("## 🔁 Python to C++ Converter")
182
  with gr.Row():
183
+ python = gr.Code(label="Python code:",language='python', value=example_code, lines=12)
184
+ cpp = gr.Code(label="C++ code:",language='cpp', lines=12)
185
  with gr.Row():
186
  model = gr.Dropdown(["GPT", "Claude", "DeepSeek"], label="Select model", value="Claude")
187
  with gr.Row():