Heaven-AI commited on
Commit
f83db16
·
verified ·
1 Parent(s): 8497fd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -14
app.py CHANGED
@@ -1,16 +1,10 @@
1
- from transformers import pipeline
2
  import gradio as gr
3
-
4
- model = pipeline("summarization",)
5
 
6
- def predict(prompt):
7
- summary = model(prompt)[0]["summary_text"]
8
- return summary
9
-
10
- with gr.Interface(predict, "textbox", "text") as interface:
11
- interface.launch()
12
- #with gr.Blocks() as demo:
13
- # textbox = gr Textbox(placeholder="Enter.text.block.to.summarize",.lines=4)
14
- # gr.interface(fn=predict, .inputs=textbox, .outputs="text")
15
-
16
- #demo.launch()
 
 
1
  import gradio as gr
 
 
2
 
3
+ with gr.Blocks(fill_height=True) as demo:
4
+ with gr.Sidebar():
5
+ gr.Markdown("# Inference Provider")
6
+ gr.Markdown("This Space showcases the deepseek-ai/DeepSeek-V3.2-Exp model, served by the novita API. Sign in with your Hugging Face account to use this API.")
7
+ button = gr.LoginButton("Sign in")
8
+ gr.load("models/deepseek-ai/DeepSeek-V3.2-Exp", accept_token=button, provider="novita")
9
+
10
+ demo.launch()