Skip to content

Commit

Permalink
0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
haouarihk committed Oct 31, 2023
1 parent da75e71 commit dbefcd7
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 74 deletions.
7 changes: 0 additions & 7 deletions data.json

This file was deleted.

20 changes: 10 additions & 10 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"packageId": "huggingface",
"name": "Huggingface Prompts Package",
"version": "0.0.3",
"minTextGeneratorVersion": "0.1.0",
"description": "Huggingface Prompts comes with Text Generator plugin in Obsidian",
"author": "Noureddine Haouari",
"tags" : "writing, brainstorming, huggingface",
"authorUrl": "https://www.buymeacoffee.com/haouarine",
"repo":"text-gen/huggingface"
}
"packageId": "huggingface",
"name": "Huggingface Prompts Package",
"version": "0.0.4",
"minTextGeneratorVersion": "0.5.0",
"description": "Huggingface Prompts comes with Text Generator plugin in Obsidian",
"author": "Noureddine Haouari",
"tags": "writing, brainstorming, huggingface",
"authorUrl": "https://www.buymeacoffee.com/haouarine",
"repo": "text-gen/huggingface"
}
35 changes: 15 additions & 20 deletions prompts/classify-bart-large-mnli.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
---
PromptInfo:
promptId: classify-bart-large-mnli
name: 🪄 classify using bart-large-mnli
description: You need to specify candidate_labels
author: Noureddine
tags: huggingface, text, classification
version: 0.0.1
config:
append:
bodyParams: false
reqParams: true
context: 'inputs'
output: "`\n==${requestResults.labels[0]}==`"
promptId: classify-bart-large-mnli
name: 🪄 classify using bart-large-mnli
description: You need to specify candidate_labels
author: Noureddine
tags: huggingface, text, classification
version: 0.0.1
provider: custom
endpoint: "https://api-inference.huggingface.co/models/facebook/bart-large-mnli"
headers: '{ "Authorization": "Bearer {{keys.hf}}" }'
body: '{ "parameters": { "candidate_labels": ["refund", "legal", "faq"] }, "inputs": "{{escp prompt}}" }'
output: '{{requestResults.labels.[0]}}'
bodyParams:
parameters:
candidate_labels: ["refund", "legal", "faq"]
reqParams:
url: "https://api-inference.huggingface.co/models/facebook/bart-large-mnli"
headers:
Authorization: "Bearer You_API_KEY_HERE"
steaming: false
---
{{selection}}
{{selection}}
***
=={{output}}==
29 changes: 9 additions & 20 deletions prompts/completeTextBloom.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
---
PromptInfo:
promptId: completeTextBloom
name: 🪄 Complete Text using Bloom Model
description: select considered context and run the command
author: Noureddine
tags: huggingface, text, bloom
version: 0.0.1
config:
append:
bodyParams: false
reqParams: true
context: 'inputs'
output: 'requestResults[0]?.generated_text'
bodyParams:
reqParams:
url: "https://api-inference.huggingface.co/models/bigscience/bloom"
headers:
Authorization: "Bearer You_API_KEY_HERE"
promptId: completeTextBloom
name: 🪄 Complete Text using Bloom Model
description: select considered context and run the command
author: Noureddine
tags: huggingface, text, bloom
version: 0.0.1
provider: hf
model: "bigscience/bloom"
---
{{selection}}

{{selection}}
31 changes: 14 additions & 17 deletions prompts/summarizeBART.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
---
PromptInfo:
promptId: summarizeBART
name: 🪄 Summarize Text using BRAT Facebook
description: select considered context and run the command
author: Noureddine
tags: huggingface, text, summarization
version: 0.0.3
config:
append:
bodyParams: false
reqParams: true
context: 'inputs'
output: 'requestResults[0]?.summary_text'
promptId: summarizeBART
name: 🪄 Summarize Text using BRAT Facebook
description: select considered context and run the command
author: Noureddine
tags: huggingface, text, summarization
version: 0.0.3
provider: custom
endpoint: "https://api-inference.huggingface.co/models/facebook/bart-large-cnn"
headers: '{ "Authorization": "Bearer {{keys.hf}}" }'
body: '{ "inputs": "{{escp prompt}}" }'
output: '{{requestResults.[0].summary_text}}'
bodyParams:
reqParams:
url: "https://api-inference.huggingface.co/models/facebook/bart-large-cnn"
headers:
Authorization: "Bearer You_API_KEY_HERE"
steaming: false
---
{{selection}}
***
{{output}}

0 comments on commit dbefcd7

Please sign in to comment.