Ramaravind commited on
Commit
dcc2428
·
verified ·
1 Parent(s): f641ce4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -17
app.py CHANGED
@@ -1,19 +1,7 @@
1
- import os
2
- from huggingface_hub import InferenceClient
3
 
4
- client = InferenceClient(
5
- provider="nebius",
6
- api_key=os.environ["HF_API_TOKEN"],
7
- )
8
 
9
- completion = client.chat.completions.create(
10
- model="openai/gpt-oss-120b",
11
- messages=[
12
- {
13
- "role": "user",
14
- "content": "What is the capital of France?"
15
- }
16
- ],
17
- )
18
-
19
- print(completion.choices[0].message)
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
 
4
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
 
 
 
5
 
6
+ demo = gr.Interface.from_pipeline(pipe)
7
+ demo.launch()