andreinigo commited on
Commit
6150c31
·
1 Parent(s): dbe1c83

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -0
app.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from utils import *
2
+ import openai
3
+ import os
4
+ import gradio as gr
5
+
6
+ openai.api_key = os.environ.get("OPENAI_API_KEY")
7
+
8
+ # Generate the app using gradio, running dramatron which is in utils.py and has the outputs titulo, prem_ep, outline, chars, scenes, all_esc
9
+
10
+ demo = gr.Interface(
11
+ fn=dramatron,
12
+ # input
13
+ inputs= [gr.Textbox(label="Premisa Serie"),
14
+ gr.Textbox(label="Keywords")],
15
+ # output
16
+ outputs=[
17
+ # title
18
+ gr.Textbox(label="Titulo"),
19
+ # episode premise
20
+ gr.Textbox(label="Premisa Episodio"),
21
+ # outline
22
+ gr.Textbox(label="Outline"),
23
+ # characters
24
+ gr.Textbox(label="Personajes"),
25
+ # scenes
26
+ gr.Textbox(label="Escenas"),
27
+ # all_esc
28
+ gr.Textbox(label="Escenas Completas")
29
+ ],
30
+ title="Dramatrónico Pléxico",
31
+ description="Escribe la premisa de tu serie y las palabras clave que quieres que aparezcan en el episodio y Dramatron te generará un episodio completo.")
32
+
33
+
34
+ if __name__ == "__main__":
35
+ demo.launch()
36
+