Spaces:
Running
Running
CesarLeblanc
commited on
Commit
•
5f4434d
1
Parent(s):
3fcba4f
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import requests
|
|
4 |
from bs4 import BeautifulSoup
|
5 |
import random
|
6 |
|
|
|
7 |
classification_model = pipeline("text-classification", model="plantbert_text_classification_model", tokenizer="plantbert_text_classification_model")
|
8 |
mask_model = pipeline("fill-mask", model="plantbert_fill_mask_model", tokenizer="plantbert_fill_mask_model", top_k=100)
|
9 |
|
@@ -149,6 +150,7 @@ with gr.Blocks() as demo:
|
|
149 |
with gr.Row():
|
150 |
with gr.Column():
|
151 |
species = gr.Textbox(lines=2, label="Species", placeholder="Enter a list of comma-separated binomial names here.")
|
|
|
152 |
with gr.Column():
|
153 |
text_output_1 = gr.Textbox()
|
154 |
text_output_2 = gr.Image()
|
|
|
4 |
from bs4 import BeautifulSoup
|
5 |
import random
|
6 |
|
7 |
+
# Initialize models
|
8 |
classification_model = pipeline("text-classification", model="plantbert_text_classification_model", tokenizer="plantbert_text_classification_model")
|
9 |
mask_model = pipeline("fill-mask", model="plantbert_fill_mask_model", tokenizer="plantbert_fill_mask_model", top_k=100)
|
10 |
|
|
|
150 |
with gr.Row():
|
151 |
with gr.Column():
|
152 |
species = gr.Textbox(lines=2, label="Species", placeholder="Enter a list of comma-separated binomial names here.")
|
153 |
+
top_k =
|
154 |
with gr.Column():
|
155 |
text_output_1 = gr.Textbox()
|
156 |
text_output_2 = gr.Image()
|