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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -3
app.py CHANGED
@@ -1,5 +1,19 @@
1
- import gradio as gr
 
2
 
3
- demo = gr.load("Helsinki-NLP/opus-mt-en-es", src="models")
 
 
 
4
 
5
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
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)