Spaces:
Runtime error
Runtime error
File size: 772 Bytes
4b54d11 90776ae 4299d62 90776ae ee69130 4299d62 90776ae ee69130 4299d62 ee69130 4299d62 ee69130 2c344ec ee69130 90776ae |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
def process_submit(semantic, zeroshot, abstract):
return f"Test"
semantic_models = ['all-mpnet-base-v2', 'msmarco-distilbert-dot-v5', 'distilbert-base-uncased', 'all-MiniLM-L6-v2', 'all-MiniLM-L12-v2', 'microsoft/mpnet-base']
zeroshot_models = ['facebook/bart-large-mnli']
iface = gr.Interface(
fn=process_submit,
inputs=[
gr.Dropdown(choices=semantic_models, label="Select a semantic model", value='all-mpnet-base-v2'),
gr.Dropdown(choices=zeroshot_models, label="Select a zeroshot model", value='facebook/bart-large-mnli'),
gr.Textbox(lines=10, placeholder="Write here the patent abstract...", label="Patent Abstract")
],
outputs="text"
)
if __name__ == "__main__":
iface.launch(show_api=False)
|