josiauhlol commited on
Commit
83d201c
·
1 Parent(s): e1bf3e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -23,7 +23,7 @@ def letterize(x):
23
  def flip_text(x):
24
  return x[::-1]
25
 
26
- def txtRouletteHandler(x)
27
  rn = random.randrange(1)
28
  if (rn == 0):
29
  return letterize(x)
@@ -31,12 +31,15 @@ def txtRouletteHandler(x)
31
  return flip_text(x)
32
 
33
  with gr.Blocks(title="Josiah's Gradio Playground") as playground:
 
 
34
  with gr.Tab("Tabs within Tabs"):
35
  with gr.Tab("1. first"):
36
  gr.Markdown("you're on 1")
37
  with gr.Tab("2. third"):
38
  gr.Markdown("you're on second")
39
  with gr.Tab("Text Roulette"):
 
40
 
41
 
42
  playground.launch()
 
23
  def flip_text(x):
24
  return x[::-1]
25
 
26
+ def txtRouletteHandler(x, y):
27
  rn = random.randrange(1)
28
  if (rn == 0):
29
  return letterize(x)
 
31
  return flip_text(x)
32
 
33
  with gr.Blocks(title="Josiah's Gradio Playground") as playground:
34
+ gr.Markdown("# Josiah's Gradio Playground")
35
+ gr.Markdown("Playing around with Gradio.")
36
  with gr.Tab("Tabs within Tabs"):
37
  with gr.Tab("1. first"):
38
  gr.Markdown("you're on 1")
39
  with gr.Tab("2. third"):
40
  gr.Markdown("you're on second")
41
  with gr.Tab("Text Roulette"):
42
+ gr.ChatInterface(txtRouletteHandler)
43
 
44
 
45
  playground.launch()