Blessin commited on
Commit
21d32a2
·
1 Parent(s): 0277d51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -13
app.py CHANGED
@@ -3,7 +3,7 @@ import random
3
  import openai
4
  import gradio as gr
5
 
6
- def generate_improv_scene(api_key, regenerate):
7
  # Initialize the OpenAI API client with the provided key
8
  openai.api_key = api_key
9
 
@@ -28,18 +28,8 @@ def generate_improv_scene(api_key, regenerate):
28
  # Create Gradio UI
29
  iface = gr.Interface(
30
  fn=generate_improv_scene,
31
- inputs=[
32
- "text", # Input for OpenAI API Key
33
- gr.inputs.Checkbox(label="Regenerate")
34
- ],
35
- outputs=[
36
- gr.outputs.Textbox(label="Dialogue"),
37
- gr.outputs.Textbox(label="Emotion"),
38
- gr.outputs.Textbox(label="Situation"),
39
- gr.outputs.Textbox(label="Location"),
40
- gr.outputs.Textbox(label="Relationship"),
41
- gr.outputs.Textbox(label="Occupation")
42
- ],
43
  live=True,
44
  title="Improv Scene Generator",
45
  description="Generate a random improv scene with dialogue, emotion, situation, location, relationship, and occupation."
 
3
  import openai
4
  import gradio as gr
5
 
6
+ def generate_improv_scene(api_key):
7
  # Initialize the OpenAI API client with the provided key
8
  openai.api_key = api_key
9
 
 
28
  # Create Gradio UI
29
  iface = gr.Interface(
30
  fn=generate_improv_scene,
31
+ inputs=["text"], # Input for OpenAI API Key
32
+ outputs=["text", "text", "text", "text", "text", "text"],
 
 
 
 
 
 
 
 
 
 
33
  live=True,
34
  title="Improv Scene Generator",
35
  description="Generate a random improv scene with dialogue, emotion, situation, location, relationship, and occupation."