JoBeer's picture
Update app.py
41c8dfe
raw
history blame
697 Bytes
import gradio as gr
import sentence_transformers
from sentence_transformers import SentenceTransformer
import pandas as pd
model = SentenceTransformer('JoBeer/all-mpnet-base-v2-eclass')
corpus = pd.read_excel('corpus.xlsx')
def predict(i):
name = corpus['did'][i]
return name
#interface = gr.Interface(fn = predict, inputs = [gr.Textbox(label="Description:", placeholder="z.B. Schaltbefehl Pumpe", lines=1), lines=1)],
# title = 'ECLASS-Suche',
# outputs = gr.outputs.Label(name))
#
#interface.launch()
import gradio as gr
def greet(name):
return "Hello " + name + "!"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()