Spaces:
Runtime error
Runtime error
Initial
Browse files- app.py +11 -14
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -1,26 +1,23 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
def preenche_descricao(exemplo):
|
| 5 |
return exemplo
|
| 6 |
|
| 7 |
-
|
| 8 |
def processa_submissao(descricao, categoria):
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
-
# Lista de exemplos de descrições de patentes
|
| 13 |
exemplos_descricao = [
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
-
"Exemplo de Descrição 3: Descrição detalhada da patente 3...",
|
| 17 |
-
# Adicione mais exemplos conforme necessário
|
| 18 |
]
|
| 19 |
|
| 20 |
-
|
| 21 |
categorias = ["Tecnologia", "Química", "Farmacêutica", "Mecânica", "Outro"]
|
| 22 |
|
| 23 |
-
|
| 24 |
iface = gr.Interface(
|
| 25 |
fn=processa_submissao,
|
| 26 |
inputs=[
|
|
@@ -30,7 +27,7 @@ iface = gr.Interface(
|
|
| 30 |
outputs="text"
|
| 31 |
)
|
| 32 |
|
| 33 |
-
|
| 34 |
-
iface.add_examples(exemplos_descricao, preenche_descricao)
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
|
| 4 |
def preenche_descricao(exemplo):
|
| 5 |
return exemplo
|
| 6 |
|
| 7 |
+
|
| 8 |
def processa_submissao(descricao, categoria):
|
| 9 |
+
return f"Test"
|
| 10 |
+
|
| 11 |
|
|
|
|
| 12 |
exemplos_descricao = [
|
| 13 |
+
"DESC1...",
|
| 14 |
+
"DESC2"
|
|
|
|
|
|
|
| 15 |
]
|
| 16 |
|
| 17 |
+
|
| 18 |
categorias = ["Tecnologia", "Química", "Farmacêutica", "Mecânica", "Outro"]
|
| 19 |
|
| 20 |
+
|
| 21 |
iface = gr.Interface(
|
| 22 |
fn=processa_submissao,
|
| 23 |
inputs=[
|
|
|
|
| 27 |
outputs="text"
|
| 28 |
)
|
| 29 |
|
| 30 |
+
iface.cache_examples(exemplos_descricao, preenche_descricao)
|
|
|
|
| 31 |
|
| 32 |
+
if __name__ == "__main__":
|
| 33 |
+
iface.launch(show_api=False)
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio
|