Blessin commited on
Commit
73def84
·
1 Parent(s): 4117e27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -65,17 +65,16 @@ def generate_statement(api_key, use_gpt):
65
  else:
66
  # Return a random dialogue from the provided list
67
  return random.choice(DIALOGUES)
68
-
69
  def main():
70
  # Define the UI components using gr.Interface
71
  interface = gr.Interface(
72
  fn=generate_statement, # Function to call on button press
73
- inputs=["text", "checkbox"], # Input is a text field for API key and a checkbox for GPT option
74
  outputs="text", # Output is a text area
75
  live=False, # Only generate statement after button press
76
  title="One Liners",
77
- description="""Welcome to "One Liners"!
78
- - Generate a random dialogue by selecting the 'Submit button' (without the API key!).
79
  - Check the "Use GPT" option for GPT to craft a brand new dialogue for you on the spot."""
80
  )
81
 
@@ -83,4 +82,4 @@ def main():
83
  interface.launch(share=True)
84
 
85
  if __name__ == "__main__":
86
- main()
 
65
  else:
66
  # Return a random dialogue from the provided list
67
  return random.choice(DIALOGUES)
 
68
  def main():
69
  # Define the UI components using gr.Interface
70
  interface = gr.Interface(
71
  fn=generate_statement, # Function to call on button press
72
+ inputs=["text", gr.inputs.Checkbox(label="Use GPT")], # Input is a text field for API key and a checkbox for GPT option
73
  outputs="text", # Output is a text area
74
  live=False, # Only generate statement after button press
75
  title="One Liners",
76
+ description="""Welcome to "One Liners"! This interactive tool provides intriguing dialogues perfect for improvisation scenes. Here's how to play:
77
+ - Generate a random dialogue by selecting the 'Submit button'.
78
  - Check the "Use GPT" option for GPT to craft a brand new dialogue for you on the spot."""
79
  )
80
 
 
82
  interface.launch(share=True)
83
 
84
  if __name__ == "__main__":
85
+ main()