Spaces:
Runtime error
Runtime error
lhl
commited on
Commit
·
812f70a
1
Parent(s):
764f34e
testing pipelines
Browse files
app.py
CHANGED
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
2 |
import gradio as gr
|
3 |
import torch
|
@@ -64,3 +75,4 @@ gr.ChatInterface(
|
|
64 |
undo_btn="Delete Previous",
|
65 |
clear_btn="Clear",
|
66 |
).queue().launch()
|
|
|
|
1 |
+
# https://www.gradio.app/guides/using-hugging-face-integrations
|
2 |
+
|
3 |
+
from transformers import pipeline
|
4 |
+
import gradio as gr
|
5 |
+
|
6 |
+
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
|
7 |
+
|
8 |
+
demo = gr.Interface.from_pipeline(pipe)
|
9 |
+
demo.launch()
|
10 |
+
|
11 |
+
"""
|
12 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
13 |
import gradio as gr
|
14 |
import torch
|
|
|
75 |
undo_btn="Delete Previous",
|
76 |
clear_btn="Clear",
|
77 |
).queue().launch()
|
78 |
+
"""
|