Skip to content

Commit 20e95ab

Browse files
authored
Merge branch 'larymak:main' into main
2 parents 67b5468 + a29ba7f commit 20e95ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2045
-1936
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
labels: enhancement
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
labels: bug
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
13+
1. Go to '...'
14+
2. Click on '....'
15+
3. Scroll down to '....'
16+
4. See error
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Screenshots**
22+
If applicable, add screenshots to help explain your problem.
23+
24+
**Environment (please complete the following information):**
25+
26+
- OS: [e.g. macOS, Windows, Linux]
27+
- Python Version: [e.g., 3.6, 3.7, 3.8, 3.9]
28+
- Any relevant dependencies or libraries
29+
30+
**Additional context**
31+
Add any other context about the problem here.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
**Related Issue(s):**
2+
Please provide a title for this pull request.
3+
4+
**Description:**
5+
Please provide a brief description of the changes you are proposing.
6+
7+
**Checklist:**
8+
9+
- [ ] I have read and followed the [contributing guidelines](/CONTRIBUTING.md).
10+
- [ ] I have updated the documentation if necessary.
11+
- [ ] I have added tests that prove my changes are effective or that my feature works.
12+
- [ ] All new and existing tests pass.
13+
14+
**Screenshots**
15+
If applicable, add screenshots to help explain behaviour of your code.
16+
17+
**Additional Notes:**
18+
Please provide any additional information about the changes you are proposing.

.github/config.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/config.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Welcome New Contributors
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
pull_request_target:
7+
types: [opened]
8+
9+
jobs:
10+
welcome:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Welcome Issue
14+
if: github.event_name == 'issues'
15+
uses: actions/github-script@v5
16+
with:
17+
script: |
18+
const issue = context.issue;
19+
const repo = context.repo;
20+
const issueAuthor = context.payload.sender.login;
21+
22+
const welcomeMessage = `
23+
Hi @${issueAuthor}! :wave:
24+
25+
Thank you for creating an issue in our repository! We appreciate your contribution and will get back to you as soon as possible.
26+
`;
27+
28+
github.rest.issues.createComment({
29+
...repo,
30+
issue_number: issue.number,
31+
body: welcomeMessage
32+
});
33+
- name: Welcome Pull Request
34+
if: github.event_name == 'pull_request_target'
35+
uses: actions/github-script@v5
36+
with:
37+
script: |
38+
const pr = context.issue;
39+
const repo = context.repo;
40+
const prAuthor = context.payload.sender.login;
41+
42+
const welcomeMessage = `
43+
Hi @${prAuthor}! :wave:
44+
45+
Thank you for submitting a pull request! We appreciate your contribution and will review your changes as soon as possible.
46+
`;
47+
48+
github.rest.issues.createComment({
49+
...repo,
50+
issue_number: pr.number,
51+
body: welcomeMessage
52+
});

AUTOMATION/Summarizer App/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.Streamlit/

AUTOMATION/Summarizer App/app.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import openai
2+
import streamlit as st
3+
4+
openai.api_key = st.secrets['api_secret']
5+
6+
st.header("Summarizer App using OpenAI ")
7+
article_text = st.text_area("Enter your scientific texts to summarize")
8+
output_size = st.radio( label = "What kind of output do you want? ", options= ["To-The-Point", "Concise", "Detailed"])
9+
10+
if output_size == "To-The-Point":
11+
out_token = 50
12+
elif output_size == "Concise":
13+
out_token = 128
14+
else:
15+
out_token = 516
16+
17+
18+
if (len(article_text)>100):
19+
# max = st.text_input("Enter the max words you want your text to be summarized in")
20+
if st.button("Generate Summary",type='primary'):
21+
response = openai.Completion.create( engine = "text-davinci-002", prompt = "Please summarize this scientific article for me in a few sentences: "+ article_text, max_tokens = out_token, temperature = 0.5)
22+
res = response["choices"][0]["text"]
23+
st.success(res)
24+
st.download_button("Download the result", res)
25+
26+
elif (len(article_text)<100):
27+
st.warning("The Sentence is not long enough")

0 commit comments

Comments
 (0)