teo-sanchez commited on
Commit
a616189
·
1 Parent(s): 3906f8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -1,15 +1,14 @@
1
- #import gradio as gr
2
- #gr.Interface.load("models/teo-sanchez/en_ner_prompting").launch()
3
  import gradio as gr
4
 
5
- from transformers import pipeline
6
-
7
- pipe = pipeline("ner", model="models/teo-sanchez/en_ner_prompting")
8
-
9
- iface = gr.Interface(
10
- inputs='text',
11
- outputs='text',
12
- examples=[["Hyperrealistic dslr film still of! justin bieber! disguised as beaver, stunning 8 k octane comprehensive 3 d render, inspired by istvan sandorfi & greg rutkowski & unreal engine, perfect symmetry, dim volumetric cinematic lighting, extremely hyper - detailed, incredibly real lifelike attributes & flesh texture, intricate, masterpiece, artstation, stunning"]]
13
- )
14
-
15
- iface.launch()
 
 
 
 
1
  import gradio as gr
2
 
3
+ iface = gr.Interface.load("models/teo-sanchez/en_ner_prompting",
4
+ title = 'Prompt entity recognizer by Selas.ai',
5
+ description="Recognize different entities within an AI prompt",
6
+ examples=[["Hyperrealistic dslr film still of a cute calico cat, stunning 8 k octane comprehensive 3 d render, inspired by istvan sandorfi & greg rutkowski & unreal engine, perfect symmetry, dim volumetric cinematic lighting, extremely hyper - detailed, incredibly real lifelike attributes & flesh texture, intricate, masterpiece, artstation, stunning"],
7
+ ["Quetzalcoatl in an epic battle with garuda, fantasy, stained glass, d & d, intricate, elegant, highly detailed, digital painting, artstation, concept art, matte, sharp focus, illustration, art by john collier and albert aublet and krenz cushart and artem demura and alphonse mucha"]],
8
+ live = True,
9
+ )
10
+
11
+ iface.input_components[0].label = "Copy-paste an AI prompt you'd like to analyze"
12
+ iface.input_components[0].value = "Hyperrealistic dslr film still of! justin bieber! disguised as beaver, stunning 8 k octane comprehensive 3 d render, inspired by istvan sandorfi & greg rutkowski & unreal engine, perfect symmetry, dim volumetric cinematic lighting, extremely hyper - detailed, incredibly real lifelike attributes & flesh texture, intricate, masterpiece, artstation, stunning"
13
+ iface.output_components[0].label = "Entity recognized in the prompt"
14
+ iface.launch()