josiauhlol commited on
Commit
fe8ec2d
1 Parent(s): cf963b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -17
app.py CHANGED
@@ -65,6 +65,7 @@ def check_cc(n):
65
  total = sum(digits)
66
  return "Valid\n\nNOW DON'T GO POSTING THAT NUMBER." if total % 2 == 0 and len(digits) == 16 else "Invalid"
67
 
 
68
  def genGrUI(code):
69
  print(glHTML.format(code))
70
  return glHTML.format(code)
@@ -88,21 +89,11 @@ with gr.Blocks(title="Josiah's Gradio Playground") as playground:
88
  validate = gr.Button("Validate", variant="primary")
89
  gr.ClearButton([num, valid])
90
  validate.click(fn=check_cc, inputs=num,outputs=valid)
91
- with gr.Tab("Gradio in Gradio"):
92
- gr.Markdown("# Gradio in Gradio!")
93
- gr.Markdown("Useful if you need to test gradio code.")
94
- with gr.Accordion("How does this work?"):
95
- gr.Markdown("""
96
- This uses gradio's HTML component and gradio lite to work.
97
- You can find the documentation for that [here.](https://www.gradio.app/guides/gradio-lite)
98
- """)
99
- with gr.Row():
100
- with gr.Column(scale=1):
101
- grUIcode = gr.Textbox(label="Gradio UI code", max_lines=200, placeholder="Code here", value=defaultCode, show_copy_button=True)
102
- subButton = gr.Button("Show me!")
103
- with gr.Column(scale=1):
104
- grUI = gr.HTML(label="Gradio UI")
105
- gr.ClearButton(grUI)
106
- subButton.click(fn=genGrUI, inputs=grUIcode, outputs= grUI)
107
-
108
  playground.launch()
 
65
  total = sum(digits)
66
  return "Valid\n\nNOW DON'T GO POSTING THAT NUMBER." if total % 2 == 0 and len(digits) == 16 else "Invalid"
67
 
68
+ #left for if i find out how to use this
69
  def genGrUI(code):
70
  print(glHTML.format(code))
71
  return glHTML.format(code)
 
89
  validate = gr.Button("Validate", variant="primary")
90
  gr.ClearButton([num, valid])
91
  validate.click(fn=check_cc, inputs=num,outputs=valid)
92
+ with gr.Tab("Changelog"):
93
+ with gr.Accordion("11/26/2023"):
94
+ with gr.Accordion("latest"):
95
+ gr.Markdown("Removed gradio in gradio")
96
+ with gr.Accordion("other"):
97
+ gr.Markdown("Added gradio in gradio")
98
+ gr.Markdown("Added CC Validator")
 
 
 
 
 
 
 
 
 
 
99
  playground.launch()