Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import sentence_transformers
|
3 |
from sentence_transformers import SentenceTransformer
|
|
|
4 |
from sentence_transformers.util import semantic_search
|
5 |
|
6 |
import pandas as pd
|
@@ -25,8 +26,9 @@ def predict(name, description):
|
|
25 |
|
26 |
return preferedName1, definition1, IRDI1, score1
|
27 |
|
28 |
-
interface = gr.Interface(fn = predict, inputs = [gr.Textbox(label="
|
29 |
outputs = [gr.Textbox(label = 'preferedName'),gr.Textbox(label = 'definition'), gr.Textbox(label = 'IDRI'),gr.Textbox(label = 'score')],
|
|
|
30 |
title = 'ECLASS-Property-Search')
|
31 |
|
32 |
interface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import sentence_transformers
|
3 |
from sentence_transformers import SentenceTransformer
|
4 |
+
import torch
|
5 |
from sentence_transformers.util import semantic_search
|
6 |
|
7 |
import pandas as pd
|
|
|
26 |
|
27 |
return preferedName1, definition1, IRDI1, score1
|
28 |
|
29 |
+
interface = gr.Interface(fn = predict, inputs = [gr.Textbox(label="Name:", placeholder="z.B. GTIN", lines=1), gr.Textbox(label="Description:", placeholder="z.B. Globel Trade Item Number", lines=1)],
|
30 |
outputs = [gr.Textbox(label = 'preferedName'),gr.Textbox(label = 'definition'), gr.Textbox(label = 'IDRI'),gr.Textbox(label = 'score')],
|
31 |
+
examples=['GTIN', 'Globel Trade Item Number'], theme = 'huggingface',
|
32 |
title = 'ECLASS-Property-Search')
|
33 |
|
34 |
interface.launch()
|