Spaces:
Runtime error
Runtime error
app.py
CHANGED
|
@@ -163,7 +163,7 @@ def sample_ddim(n_sample, n=20):
|
|
| 163 |
|
| 164 |
def greet(input):
|
| 165 |
samples, intermediate = sample_ddim(32, n=25)
|
| 166 |
-
response = im.fromarray(intermediate[24][0][1]).convert("RGB")
|
| 167 |
return response
|
| 168 |
|
| 169 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
@@ -171,5 +171,5 @@ def greet(input):
|
|
| 171 |
|
| 172 |
#iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Text to find entities", lines=2)], outputs=[gr.HighlightedText(label="Text with entities")], title="NER with dslim/bert-base-NER", description="Find entities using the `dslim/bert-base-NER` model under the hood!", allow_flagging="never", examples=["My name is Andrew and I live in California", "My name is Poli and work at HuggingFace"])
|
| 173 |
#iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Co-Retailing Business")], outputs=gr.outputs.Image(type="pil", label="Output Image"))
|
| 174 |
-
iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Co-Retailing Business")], outputs="Text")
|
| 175 |
iface.launch()
|
|
|
|
| 163 |
|
| 164 |
def greet(input):
|
| 165 |
samples, intermediate = sample_ddim(32, n=25)
|
| 166 |
+
response = im.fromarray(intermediate[24][0][1]).convert("RGB")
|
| 167 |
return response
|
| 168 |
|
| 169 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
|
| 171 |
|
| 172 |
#iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Text to find entities", lines=2)], outputs=[gr.HighlightedText(label="Text with entities")], title="NER with dslim/bert-base-NER", description="Find entities using the `dslim/bert-base-NER` model under the hood!", allow_flagging="never", examples=["My name is Andrew and I live in California", "My name is Poli and work at HuggingFace"])
|
| 173 |
#iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Co-Retailing Business")], outputs=gr.outputs.Image(type="pil", label="Output Image"))
|
| 174 |
+
iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Co-Retailing Business")], outputs="Text")
|
| 175 |
iface.launch()
|