iAIChat commited on
Commit
5b85c4a
·
1 Parent(s): b2725ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ model_id = os.getenv("model_id")
14
  hf_api_key = os.getenv("hf_api_key")
15
 
16
  #api_url ="https://api-inference.huggingface.co/models/DunnBC22/flan-t5-base-text_summarization_data"
17
- api_url =f"https://api-inference.huggingface.co/models/DunnBC22/{model_id}"
18
 
19
  def get_completion(inputs, parameters=None, ENDPOINT_URL=api_url):
20
  headers = {
@@ -40,7 +40,7 @@ demo = gr.Interface(fn=summarize,
40
  inputs=[gr.Textbox(label="Text to summarize", lines=6)],
41
  outputs=[gr.Textbox(label="Result", lines=3)],
42
  title="基于HF requests.request的文本总结AI App/Text summarization with distilbart-cnn",
43
- description="Summarize any text using the `shleifer/distilbart-cnn-12-6` model under the hood!"
44
  )
45
 
46
  demo.launch()
 
14
  hf_api_key = os.getenv("hf_api_key")
15
 
16
  #api_url ="https://api-inference.huggingface.co/models/DunnBC22/flan-t5-base-text_summarization_data"
17
+ api_url =f"https://api-inference.huggingface.co/models/{model_id}"
18
 
19
  def get_completion(inputs, parameters=None, ENDPOINT_URL=api_url):
20
  headers = {
 
40
  inputs=[gr.Textbox(label="Text to summarize", lines=6)],
41
  outputs=[gr.Textbox(label="Result", lines=3)],
42
  title="基于HF requests.request的文本总结AI App/Text summarization with distilbart-cnn",
43
+ description="Summarize any text using the D_f-t5-base-txt_sum model under the hood!"
44
  )
45
 
46
  demo.launch()