diff --git a/.gitattributes b/.gitattributes index 81d2d8c..a99994f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ *.tflite filter=lfs diff=lfs merge=lfs -text *ttf filter=lfs diff=lfs merge=lfs -text +*mp4 filter=lfs diff=lfs merge=lfs -text diff --git a/assets/meme-gen-app-design.mp4 b/assets/meme-gen-app-design.mp4 new file mode 100644 index 0000000..2a5703e Binary files /dev/null and b/assets/meme-gen-app-design.mp4 differ diff --git a/restapi/memegen/app.py b/restapi/memegen/app.py new file mode 100644 index 0000000..c5cbc9a --- /dev/null +++ b/restapi/memegen/app.py @@ -0,0 +1,172 @@ +import os +import random +import shutil +from datetime import datetime + +import numpy as np +import cv2 +from PIL import ImageFont, ImageDraw, Image +from flask import Flask, request, render_template, jsonify, send_file +from werkzeug.utils import secure_filename +import tensorflow as tf + +app = Flask(__name__) + +# Configuration +STATIC = os.getenv("UPLOAD_FOLDER", "./static") +app.config["UPLOAD_FOLDER"] = os.path.join(STATIC, "inputs") +app.config["RESULTS_FOLDER"] = os.path.join(STATIC, "results") +app.config["MAX_CONTENT_LENGTH"] = 16 * 1024 * 1024 +ALLOWED_EXTENSIONS = {"png", "jpg", "jpeg"} +LABELS = ["happy", "disgust", "neutral", "sad", "fear", "anger", "surprise"] + + +def allowed_file(filename): + return "." in filename and filename.rsplit(".", 1)[1].lower() in ALLOWED_EXTENSIONS + + +def get_interpreter(model_path): + interpreter = tf.lite.Interpreter(model_path=model_path) + interpreter.allocate_tensors() + return interpreter + + +def predict_emotion(interpreter, labels, frame): + input_details = interpreter.get_input_details() + output_details = interpreter.get_output_details() + interpreter.set_tensor(input_details[0]["index"], frame) + interpreter.invoke() + output_data = interpreter.get_tensor(output_details[0]["index"]) + return {labels[i]: output_data[0][i] for i in range(len(labels))} + + +def detect_face(img): + face_cascade = cv2.CascadeClassifier( + "facedetection/haarcascade_frontalface_default.xml" + ) + gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) + faces = face_cascade.detectMultiScale(gray, 1.3, 5) + if len(faces) == 0: + return False + for x, y, w, h in faces: + roi_gray = img[y : y + h, x : x + w] + cropped_img = np.expand_dims( + np.expand_dims(cv2.resize(roi_gray, (224, 224)), -1), 0 + ) + return roi_gray + + +def get_font_size(text): + length = len(text) + if length < 12: + return 36 + elif length < 20: + return 26 + else: + return 48 - length + + +def add_text_to_image(label, img): + label_file = f"memes/{label}.txt" + with open(label_file, "r") as f: + texts = [x.strip() for x in f] + + chosen_text = random.choice(texts) + lines = chosen_text.split("|") + color = (255, 255, 255) + shadowcolor = (0, 0, 0) + + img = cv2.resize(img, (300, 300)) + cv2_im_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) + pil_im = Image.fromarray(cv2_im_rgb) + draw = ImageDraw.Draw(pil_im) + + for i, line in enumerate(lines): + font_size = get_font_size(line) + font = ImageFont.truetype("1.ttf", font_size) + x, y = 29 - len(line) + 2, 230 - 30 * (len(lines) - 1) + 30 * i + draw_text_with_border(draw, (x, y), line, font, color, shadowcolor) + + return cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) + + +def draw_text_with_border(draw, position, text, font, color, shadowcolor): + x, y = position + # thin border + draw.text((x - 1, y), text, font=font, fill=shadowcolor) + draw.text((x + 1, y), text, font=font, fill=shadowcolor) + draw.text((x, y - 1), text, font=font, fill=shadowcolor) + draw.text((x, y + 1), text, font=font, fill=shadowcolor) + # thicker border + draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) + draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) + draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) + draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) + # main text + draw.text((x, y), text, font=font, fill=color) + + +def save_image_with_logo(image_path, result_path): + Image1 = Image.open(image_path) + Image1copy = Image1.copy() + Image2 = Image.open("static/dontdelete/logo.jpeg") + Image2copy = Image2.copy() + Image2copy.putalpha(128) + Image2copy = Image2copy.resize((60, 30), Image.LANCZOS) + Image1copy.paste(Image2copy, (235, 265), Image2copy) + Image1copy.save(result_path) + + +def cleanup_folder(folder): + for filename in os.listdir(folder): + file_path = os.path.join(folder, filename) + if os.path.isfile(file_path) and file_path.lower().endswith(('.png', '.jpg', '.jpeg')): + os.unlink(file_path) + + +@app.route("/") +def index(): + return render_template("memslide.html") + + +@app.route("/", methods=["POST"]) +def upload_file(): + # Clean up previous files + cleanup_folder(app.config["UPLOAD_FOLDER"]) + cleanup_folder(app.config["RESULTS_FOLDER"]) + + file = request.files.get("photo") + if file and allowed_file(file.filename): + now = datetime.now().strftime("%Y-%m-%d-%H-%M-%S") + filename = secure_filename(file.filename) + file_extension = filename.split(".")[-1] + saved_filename = f"{now}.{file_extension}" + file_path = os.path.join(app.config["UPLOAD_FOLDER"], saved_filename) + file.save(file_path) + + img = cv2.imread(file_path) + face_img = detect_face(img) + + if face_img is False: + img = add_text_to_image("noface", img) + else: + img = cv2.resize(img, (224, 224)) + face_img = cv2.resize(face_img, (224, 224)) + interpreter = get_interpreter("models/memegen1.tflite") + results = predict_emotion(interpreter, LABELS, [face_img]) + dominant_emotion = max(results, key=results.get) + img = add_text_to_image(dominant_emotion, img) + + result_path = os.path.join(app.config["RESULTS_FOLDER"], saved_filename) + cv2.imwrite(result_path, img) + save_image_with_logo(result_path, result_path) + + result_dic = {"im": f"results/{saved_filename}"} + return render_template("memslide.html", image=result_dic) + else: + result_dic = {"im": "dontdelete/file.jpg"} + return render_template("memslide.html", image=result_dic) + + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=1234) diff --git a/restapi/memegen/memes/anger.txt b/restapi/memegen/memes/anger.txt index 8062a63..8cc37b7 100644 --- a/restapi/memegen/memes/anger.txt +++ b/restapi/memegen/memes/anger.txt @@ -50,4 +50,56 @@ Why are u taking the |backpack to the bathroom | *me: I'll kill you Wen lecturers dont | give attendance after | sitting for whole 2 hrs Wen ur guide doesnt|sign ur project report Wen ur roommate| sets continuous alarms |but doesnt wake up -Wen u forget a semicolon |in a code and |it shows 3666 errors \ No newline at end of file +Wen u forget a semicolon |in a code and |it shows 3666 errors +When your coworker | takes credit for | your idea in a meeting +That moment when | your internet goes out | during a crucial online test +When your boss | sends an email at 5:01 PM | on a Friday +The look on my face | when my favorite series | gets canceled +When someone cuts | in front of you in line | at the coffee shop +When you finally get | comfortable in bed and | remember you left | the kitchen light on +When you spill coffee | on your new white shirt | first thing in the morning +When you get a parking ticket | just as you're about to leave +When someone leaves | their shopping cart | in the middle of the parking lot +When your phone | battery dies and you | forgot your charger at home +When you're starving | and your food order | gets messed up +When someone plays | loud music on public transport +When you find out | there's a surprise meeting | right before lunch +When your favorite | restaurant is out of | your favorite dish +When you're ready to leave | but your friend is still | getting ready +When you see your ex | with someone new +When you find out | your favorite shirt | has a stain on it +When someone spoils | the ending of a movie | you were excited to see +When your alarm | doesn't go off and | you oversleep +When you have | a million tabs open | and your browser crashes +When someone borrows | something and returns | it broken +When you're stuck in traffic | and you have to use | the bathroom +When your favorite | team loses because | of a bad call +When you can't find | matching socks +When someone parks | too close and you can't | get into your car +When you realize you | left your wallet at home | after shopping +When someone keeps | interrupting you +When you get to the gym | and realize you forgot | your workout clothes +When you step in a puddle | and your socks get wet +When you burn your tongue | on hot coffee +When someone keeps | clicking their pen | during a meeting +When you have a great idea | and forget it | two minutes later +When you can't find | your keys and you're | already late +When your favorite pen | runs out of ink +When you get a | paper cut on | the same spot again +When you miss the bus | by a second +When you get | a parking spot | but it's too tight +When you're in a hurry | and the printer jams +When you have a | song stuck in your head | but can't remember the name +When you drop your phone | and it lands face down +When you finally sit down | to eat and the doorbell rings +When you clean | the house and someone | messes it up +When your friend cancels | plans at the last minute +When you get your hair done | and it doesn't turn out | the way you wanted +When your favorite app | keeps crashing +When you spill something | on your laptop +When you realize you | sent a text to | the wrong person +When you wait forever | for an elevator and | it's full when it arrives +When someone starts | a sentence with "no offense" | but it's definitely offensive +When you can't find | the TV remote | and it's right in front of you +When you drop food | on your clean clothes +When your favorite | snack is sold out | at the store diff --git a/restapi/memegen/memes/disgust.txt b/restapi/memegen/memes/disgust.txt index 8b934d6..09b6e0d 100644 --- a/restapi/memegen/memes/disgust.txt +++ b/restapi/memegen/memes/disgust.txt @@ -45,4 +45,55 @@ Wen u hit ur toe|while walking Wen ur guide doesnt|sign ur project report Wen u forget a semicolon |in a code and |it shows 3666 errors Wen someone asks u |to say disgusting things|becoz u have a |disgusting face -Wen ur roommate| sets continuous alarms |but doesnt wake up \ No newline at end of file +Wen ur roommate| sets continuous alarms |but doesnt wake up +When someone chews | with their mouth open | right next to you +When you see someone | not washing their hands | after using the restroom +When your coworker | microwaves fish in | the office kitchen +When someone clips | their nails in public +When you find hair | in your food +When you realize | your socks are wet | from a puddle you stepped in +When your friend | talks about their | conspiracy theories +When someone sneezes | without covering their mouth +When you see a couple | overly PDA-ing in public +When you accidentally | drink spoiled milk +When someone picks | their nose in public +When you see a | questionable stain | on public transportation +When your roommate | leaves dirty dishes | for days +When someone talks | with food in their mouth +When your friend | won’t stop talking | about their diet +When you have to clean | someone else’s mess +When your friend | doesn’t cover their | coughs or sneezes +When you find mold | in the fridge +When someone burps | loudly at the table +When someone licks | their fingers after | eating +When you see someone | spit on the sidewalk +When someone doesn’t | cover their mouth | while yawning +When you find out | your favorite snack | has been discontinued +When your friend tells | a gross story | at the dinner table +When you smell | someone’s bad breath +When someone says | they never brush | their teeth before bed +When you find out | your hotel room | wasn’t cleaned properly +When your friend | wears the same clothes | multiple days in a row +When someone puts | their feet on | the table +When you see someone | double dip at a party +When someone uses | your towel without | asking +When your friend’s pet | has an accident | on the floor +When someone leaves | food out overnight +When you realize | you’ve been wearing | mismatched socks all day +When you see someone | eating loudly in | a quiet place +When you notice | a stranger’s dandruff | on their shirt +When someone leaves | hair in the shower drain +When you find out | your roommate | hasn’t done laundry | in weeks +When your friend | talks about their | gross medical issue +When you see someone | not wearing deodorant +When you hear | someone snoring loudly +When your friend | sneezes on your | phone screen +When you find out | someone doesn’t | change their bed sheets | regularly +When your friend | doesn’t flush the toilet +When someone leaves | the bathroom without | washing their hands +When you discover | your coworker’s desk | is a mess +When someone tells you | they don’t believe | in personal hygiene +When you see a cockroach | in your kitchen +When your friend | never takes out | the trash +When someone eats | with their mouth open +When you find out | your friend's pet | isn't house-trained diff --git a/restapi/memegen/memes/fear.txt b/restapi/memegen/memes/fear.txt index 5e07fa4..5812227 100644 --- a/restapi/memegen/memes/fear.txt +++ b/restapi/memegen/memes/fear.txt @@ -44,4 +44,56 @@ Wen you give 1000s of |speeches about social distancing |but become the first pe The moment I get to know|we are living in red zone Me trying to open books|and study something|a day before exams Wen u write |800 lines of code|and exit without saving -Wen u are asked to|publish a research paper \ No newline at end of file +Wen u are asked to|publish a research paper +When you see the dentist | pulling out the biggest drill +When you realize | you sent a text to | the wrong person +When the IT guy | asks to meet | after seeing your search history +When you hear the phrase | "we need to talk" +When you check your bank account | after a weekend of | impulse shopping +When you see a spider | in your room and | it suddenly disappears +When you realize | you’ve been talking to | someone with spinach | in your teeth +When your car makes | a weird noise | and you have no idea why +When you remember | you left the stove on | just as you fall asleep +When you hear | unexpected knocks | on the door +When you check the weather | and see a | severe storm warning +When you realize | you missed an important | meeting at work +When your phone rings | and it's an unknown number +When you accidentally | delete an important | file from your computer +When you see the | "low battery" alert | and you're far from | a charger +When you find a | surprise bill in the mail +When your boss | asks you to come | into their office +When you hear | a loud noise | in the middle of the night +When you realize | you forgot to | study for the exam +When the plane hits | turbulence mid-flight +When you hear a | cracking noise | from your phone screen +When you realize | you forgot your | anniversary +When you get a | message from your ex | out of the blue +When you see | the "blue screen of death" | on your computer +When you realize | you left your keys | inside the car +When you hear footsteps | behind you at night +When you wake up | late for an | important interview +When you hear | a weird noise | coming from the basement +When your GPS | loses signal in | the middle of nowhere +When you realize | your essay is due | in one hour +When you get a | friend request from | your boss +When you see a | rat run across | the kitchen floor +When you hear a | loud crash | from the other room +When you realize | your phone | isn’t in your pocket +When you check | your email and see | a message from HR +When you have to | walk down a dark | alley alone +When you realize | you left the | garage door open +When you get | an unexpected | "we need to talk" text +When you notice | a creepy shadow | in the corner of the room +When you hear | the fire alarm | go off at 2 AM +When your friend | says "guess what | I heard about you" +When you feel | your phone vibrate | but there’s no notification +When you realize | you locked yourself | out of your house +When your car | won’t start in | a deserted parking lot +When you get | an unexpected call | from your doctor +When you hear | the sound of glass | breaking downstairs +When you see | the check engine light | turn on +When you realize | you forgot to submit | your assignment +When you hear | someone call your name | but you’re alone +When you find | an unexpected | guest in your bed +When you realize | the food you ate | might have been expired +When you hear | the siren of a police car | behind you diff --git a/restapi/memegen/memes/happy.txt b/restapi/memegen/memes/happy.txt index 2102663..4f6b69b 100644 --- a/restapi/memegen/memes/happy.txt +++ b/restapi/memegen/memes/happy.txt @@ -29,14 +29,67 @@ Maths teacher wen he/she|gets to know that|PT teacher is absent Closed Instagram. So what now?|*Opens again Wen u see ur ex |roaming on the road |during lockdown |and u are police Wen u are tortured by |ur mentor but get to know|his son is ur junior -Wen u can't buy happiness|but u can buy weed That awesome moment|when u r too happy but|you don't know why|and u dont care Wen you die before|taking a bath in winter My happy friday face|looks like this! -I know I know|Iam so freaking adorable|that I instantly|make u happy +I know I know|Iam so freaking adorable|that I instantly|make u happy Wen I say agra..|to a friend but get appreciated|by teacher for saying the|correct location of TajMahal Wen she loves dogs |and ur nickname is puppy Every mothers reaction|when her child speaks|in English with someone Me telling my gf that |I love her like I love the|stars in the morning sky Tell me those |3 magical words|*You: sudo apt update -2020 to me: |You having fun yet? \ No newline at end of file +2020 to me: |You having fun yet? +When you find money | in your old jeans pocket +When you get an extra | nugget in your meal +When your favorite song | comes on the radio +When you hit every | green light on the way home +When you realize it's | Friday and not Thursday +When you see your food | coming at the restaurant +When you finish all | your errands early +When you get a compliment | from a stranger +When you wake up | and realize it's | the weekend +When you get the | last item in stock +When you remember | you have leftovers | in the fridge +When you see a | dog on your walk +When you make it | to the gym and | it's not crowded +When your favorite show | releases a new season +When you get your | perfect parking spot +When you realize | you have no | homework tonight +When you find the | perfect gif for | a situation +When you get to | the airport and | your flight is on time +When you finish | a great book +When you get an | unexpected day off +When you nail a | new recipe on | the first try +When your crush | likes your post +When you find out | there's a sale on | your favorite brand +When you get an | unexpected bonus +When you find a | great new series | to binge-watch +When you wake up | before your alarm | feeling refreshed +When you get a | new high score | in your game +When your friend | brings you coffee | unexpectedly +When you see your | favorite author | has a new book +When you have a | great hair day +When you get a | handwritten letter +When you remember | to bring your | reusable bags +When you see a | double rainbow +When you make someone | laugh out loud +When your favorite team | wins the championship +When you finally | finish a big project +When you find a | great new playlist +When you get an | A on your paper +When you realize | you don't have | any meetings today +When you get a | text from an | old friend +When you find a | new hobby you love +When you get a | window seat | on the plane +When you have | perfect weather | for your plans +When you get a | surprise package +When you have a | productive morning +When you get a | good night's sleep +When you hit your | daily step goal +When you try a | new restaurant | and it's amazing +When you see | fireworks on | a summer night +When you finish a | difficult puzzle +When you make a | new friend +When you have a | great conversation +When you see | your favorite | childhood movie +When you get the | last slice of pizza diff --git a/restapi/memegen/memes/neutral.txt b/restapi/memegen/memes/neutral.txt index 1322a95..bf10b62 100644 --- a/restapi/memegen/memes/neutral.txt +++ b/restapi/memegen/memes/neutral.txt @@ -9,7 +9,6 @@ That moment wen | all ur frnds are in | ace and u still in gold Oh was that a joke?|Remind me later to laugh=.= People say I'm a | plagiarist. Their words | not mine I lost my mood ring | and I donno |how to feel about it. -Give that guy | some weed If Monday morning | had a face Wen someone talks | about true love Moment u make eye contact|with co-worker while|walking down the hall @@ -34,4 +33,56 @@ Wen u only use ur phone| for memes Wen u order security to|increase AC temp. in an ATM| *le security That moment wen|u realize they weren't|waving at u Why r frogs happy?|*Me: Because they eat evrythng|that bugs them -When u listen 2 despacito| for the first time \ No newline at end of file +When u listen 2 despacito| for the first time +When you finish a task | and your boss gives you | another one +When you’re watching TV | and the Wi-Fi goes out +When someone explains a joke | and it's still not funny +When you see someone | from high school and | pretend not to notice +When you realize it's | only Tuesday +When someone starts a story | with "you had to be there" +When you find out | your favorite show got cancelled +When you have plans | but wish you could cancel +When your favorite coffee shop | runs out of your usual order +When you’re listening to a song | and realize it’s on repeat +When someone says | "let’s hang out soon" | and you know they don’t mean it +When you realize | you left your headphones at home +When your phone dies | right when you get a text +When someone tags you | in an unflattering photo +When you get a text | but it's from a group chat +When you wake up | two minutes before your alarm +When you open the fridge | and there's no food +When you realize | you missed your favorite show +When you go to bed | and can't fall asleep +When you get up | to get something and forget what it was +When you realize | you forgot to do your homework +When you walk into a room | and forget why you’re there +When your friend cancels | plans at the last minute +When you send a text | and get no reply +When you order something online | and it arrives broken +When you get to work | and realize it’s a holiday +When someone spoils | the ending of a movie +When your phone alarm | goes off during a meeting +When you find out | you have a surprise quiz +When someone starts talking | about politics +When you see | an awkward family photo +When someone asks | if you’re okay and you’re not +When your favorite song | gets stuck in your head +When you realize | you’ve been talking | to someone for too long +When you check your email | and it's all spam +When you get a notification | but it's just an app update +When you realize | you’ve been on your phone | for hours +When you go to a party | and don’t know anyone +When someone says | "we need to talk" | and you know it’s bad +When you see someone | wearing the same outfit as you +When you try to take a nap | but can’t fall asleep +When your ice cream | falls off the cone +When someone | steals your parking spot +When you finally sit down | and someone asks for help +When you realize | you forgot your umbrella | on a rainy day +When you’re in a rush | and everything goes wrong +When you get | to the front of the line | and they close +When you see a typo | in your own text +When you hear your alarm | and realize you have | to get up +When you finally | get comfortable | and someone calls you +When you see | a "funny" meme | that isn’t funny +When you realize | you’re out of coffee diff --git a/restapi/memegen/memes/noface.txt b/restapi/memegen/memes/noface.txt index 1ce3d9a..ec6e3af 100644 --- a/restapi/memegen/memes/noface.txt +++ b/restapi/memegen/memes/noface.txt @@ -15,4 +15,54 @@ Wen ur frnd says: |Moham epudaina addam| lo chuskunava? We dont serve EXPRESSIONLESS |faces. Sorry! You want a meme?| then read the rules, again! Oksari mee face detect|kaledu antey matram| image lo face ledu ani |ardam #alvp -Chinna, manchi clarity |una pic pettey|Bomma daddarillu podhi| I Promise. \ No newline at end of file +Chinna, manchi clarity |una pic pettey|Bomma daddarillu podhi| I Promise. +Are you a ghost? | Because I see no face here. +I didn’t realize | this was a picture | of a potato. +I can’t detect | what isn’t there, buddy. +Are you sure | this isn’t an | abstract painting? +Is this a | Where’s Waldo | for faces? +Even my dog’s | face is more | recognizable than this. +Does this picture | come with | a face upgrade? +This isn’t | Hide and Seek; | show your face! +Did you upload | an empty room? +Sorry, our face | detector is on | strike today. +This image is | as clear as | my future. +A face would | be nice, you know. +I think you | uploaded a | blank page. +Face not found. | Please try | again later. +Is this your | attempt at | modern art? +I’m not saying | you’re faceless, | but… +Face recognition | failed. | Please insert | a face. +Is this a | picture of | your elbow? +Did you borrow | the Invisible Man’s | face? +This isn’t | a mirror, dude. +Is your camera | allergic to | faces? +I see pixels, | but no face. +Did you upload | an image | of the sky? +Not sure if | you’re playing | a prank or | need a new camera. +Sorry, no face | detected in | this universe. +Is this a | witness protection | program photo? +I think you | sent us a | picture of | Bigfoot. +Are you sure | there’s a face | in there? +Next time, | try showing | your face. +This photo is | like my ex - | nowhere to be seen. +Is this | a photo of | the Loch Ness Monster? +Face not | found. Please | add more pixels. +This picture is | more mysterious | than a black hole. +Are you a | professional | face hider? +This must be | a selfie | from your dog. +Maybe it’s | time to | clean your lens? +Even AI can’t | handle your | faceless charm. +I thought | you said | there was | a face here. +Are you trying | to hide from | facial recognition? +This isn’t | a face-off, it’s | a face-miss. +Your camera | must have | fallen asleep. +Did you | accidentally | take a photo | of your floor? +Even ghosts | have more | visible faces. +I see everything | but a face. +Is this the | latest trend in | faceless photography? +I think your | face took | a day off. +This is more | of a facepalm | moment. +You call this | a photo? | I call it | a mystery. +Where’s the face? | I must be | missing something. +Is this an | entry for | the invisible | face contest? diff --git a/restapi/memegen/memes/sad.txt b/restapi/memegen/memes/sad.txt index f536261..098c5dc 100644 --- a/restapi/memegen/memes/sad.txt +++ b/restapi/memegen/memes/sad.txt @@ -46,7 +46,7 @@ Wen u are a doctor and |everyone is praising u |for your efforts |but u r a dent 3 million positive cases and|about 250k deaths and |mom is worried| about my haircut. The moment wen u |realize even an amoeba diagram|cannot fetch u >0 Me trying to open books|and understand subject|a day before exams -The moment my frnd|tells his break up story +The moment my frnd|tells his break up story The moment I get to know|we are living in red zone Wen u write |800 lines of code|and exit without saving Wen ur college decides| to conduct online exams @@ -55,4 +55,55 @@ Wen u die of corona | but are reborn in China Wen someone reminds|u of Dhonis runout |during world cup Wen u are asked to |publish a research paper Wen someone asks u to|say disgusting things| becoz u have|a disgusting face -Wen u can't find ur spectacles|becoz u cant see |without spectacles \ No newline at end of file +Wen u can't find ur spectacles|becoz u cant see |without spectacles +When you accidentally send | a text to the wrong person +When you see your | crush with someone else +When you realize you left | your wallet at home +When you spill coffee on | your favorite shirt +When you realize it's only | Wednesday +When your phone battery | dies mid-conversation +When you miss the bus by | a second +When you get stood up on | a date +When your pet ignores you | all day +When you lose your last | match in a game +When you find out your | favorite show is canceled +When you can't find a | matching sock +When you realize you forgot | to do your homework +When you step on a | piece of Lego +When you get rained on | without an umbrella +When your friends go out | without inviting you +When you burn your tongue | on hot coffee +When your car won't start | in the morning +When your vacation ends | too soon +When you drop your | ice cream cone +When you find out | there's no more pizza +When you realize you left | the stove on +When you lose your keys | right before you leave +When you break your | phone screen +When you get a parking ticket | on a bad day +When you realize you forgot | your best friend's birthday +When your computer crashes | without saving your work +When your favorite team | loses the game +When you have to work | on a holiday +When you miss an important | call from your crush +When you get stuck in | traffic for hours +When your internet goes out | during a movie +When you realize you | overcooked your dinner +When you drop your phone | in water +When your alarm doesn't go | off and you're late +When your package arrives | damaged +When you lose your wallet | in a crowded place +When you spill water | on your laptop +When you get an email | from your ex +When you run out of | your favorite snack +When you realize you have | a surprise quiz +When your pet ruins | your favorite shoes +When you forget your | login password +When you get a | paper cut +When you miss your | flight +When you find out you | gained weight +When you lose your | train of thought +When you have to wait | in a long line +When you realize your | favorite store is closed +When you break a | treasured item +When your favorite | pen runs out of ink diff --git a/restapi/memegen/memes/surprise.txt b/restapi/memegen/memes/surprise.txt index 736ac1e..9e21cdc 100644 --- a/restapi/memegen/memes/surprise.txt +++ b/restapi/memegen/memes/surprise.txt @@ -24,4 +24,54 @@ Ur reaction when the left out|questions come in exam Wen someone I donno|tells me they have w*ed|but no company Wen u are a gay |but ur bf/gf is a lesbian Wen Govt. asks u to light diya | but someone bursts crackers -When your college decides|to conduct online exams \ No newline at end of file +When your college decides|to conduct online exams +Wen ur best friend | actually remembers | your birthday +Wen u find money | in an old coat pocket +Wen ur pet does a trick | you didn’t teach them +Wen u get an unexpected | bonus at work +Wen ur favorite band | releases a new song +Wen u wake up and realize | you have the day off +Wen u get to the airport | and there's no line at security +Wen ur crush laughs at | your joke +Wen ur package arrives | earlier than expected +Wen u finish a book | and the sequel is | already out +Wen u get a text from | someone you miss +Wen ur flight gets | upgraded to first class +Wen u run into an old | friend and they remember | everything about you +Wen ur boss gives you | unexpected praise +Wen u find the perfect | gift for someone +Wen ur phone battery | lasts all day +Wen ur friend brings you | coffee without asking +Wen u get to the | front of the line | just as it starts to rain +Wen u find a parking spot | right in front +Wen ur favorite movie is | on TV +Wen u see a double rainbow +Wen ur team wins | the championship +Wen ur food comes out | looking exactly like | the picture +Wen ur favorite | restaurant has no wait +Wen u get a surprise | day off +Wen u find out you | passed a difficult test +Wen ur flight is | on time +Wen ur friend | cancels plans you | didn’t want to go to +Wen u get a surprise | refund +Wen u wake up | before your alarm +Wen u finish a task | earlier than expected +Wen u find out | there’s free food +Wen ur favorite store | has a sale +Wen ur friend pays | for your meal +Wen ur favorite | song comes on +Wen u get a | compliment from | a stranger +Wen ur favorite | team scores +Wen u find a | new favorite show +Wen u get a | surprise package +Wen u realize you | have extra time +Wen ur favorite | snack is in stock +Wen u see a | shooting star +Wen ur friend | surprises you with | a visit +Wen u find out | you’re getting a | new neighbor +Wen ur friend | surprises you with | concert tickets +Wen u get a | handwritten letter +Wen ur favorite | brand has a sale +Wen u realize | it’s a holiday +Wen u get the | last available seat +Wen ur friend | surprises you with | a gift diff --git a/restapi/memegen/server.py b/restapi/memegen/server.py deleted file mode 100644 index 30a645b..0000000 --- a/restapi/memegen/server.py +++ /dev/null @@ -1,371 +0,0 @@ -from flask import Flask, request, render_template, jsonify -import base64 -from io import BytesIO -import random -import numpy as np -from PIL import ImageFont, ImageDraw, Image -import werkzeug -import time -from datetime import datetime -import tensorflow as tf -import cv2 - -app = Flask(__name__) - - -def layer(path, labels, frame): - d = {} - interpreter = tf.lite.Interpreter(model_path=path) - interpreter.allocate_tensors() - - # Get input and output tensors. - input_details = interpreter.get_input_details() - output_details = interpreter.get_output_details() - - interpreter.set_tensor(input_details[0]["index"], frame) - interpreter.invoke() - - # The function `get_tensor()` returns a copy of the tensor data. - # Use `tensor()` in order to get a pointer to the tensor. - output_data = interpreter.get_tensor(output_details[0]["index"]) - for i in range(len(labels)): - d[labels[i]] = output_data[0][i] - return d - - -def detectface(img): - face_cascade = cv2.CascadeClassifier( - "facedetection/haarcascade_frontalface_default.xml" - ) - gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) - faces = face_cascade.detectMultiScale(gray, 1.3, 5) - if len(faces) == 0: - return False - for x, y, w, h in faces: - roi_gray = img[y : y + h, x : x + w] - cropped_img = np.expand_dims( - np.expand_dims(cv2.resize(roi_gray, (224, 224)), -1), 0 - ) - return roi_gray - - -def lenghth(a): - s = len(a) - if s < 12: - return 36 - elif s < 20: - return 26 - else: - return 48 - len(a) - - -def text_alignment(label, im): - label = "memes/" + label + ".txt" - f = open(label, "r") - s = [x for x in f] - # print(s) - w = 300 - h = 300 - color = (255, 255, 255) - dim = (w, h) - a = random.choice(s) - print(a) - a = list(a.split("|")) - shadowcolor = (0, 0, 0) - try: - im = cv2.resize(im, dim, interpolation=cv2.INTER_AREA) - cv2_im_rgb = cv2.cvtColor(im, cv2.COLOR_BGR2RGB) - pil_im = Image.fromarray(cv2_im_rgb) - draw = ImageDraw.Draw(pil_im) - font = ImageFont.truetype("1.ttf", 40) - if len(a) == 1: - org = 29 - len(a[0]) + 2, 230 - x, y = org - fontScale = lenghth(a[0]) - font = ImageFont.truetype("1.ttf", fontScale) - # thin border - text = a[0][:-1] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[0][:-1], color, font=font) - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - elif len(a) == 2: - org = 29 - len(a[0]) + 2, 7 - x, y = org - fontScale = lenghth(a[0]) - font = ImageFont.truetype("1.ttf", fontScale) - - # thin border - text = a[0] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[0], color, font=font) - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - org = 29 - len(a[1]) + 2, 230 - x, y = org - fontScale = lenghth(a[1]) - font = ImageFont.truetype("1.ttf", fontScale) - # thin border - text = a[1] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[1], color, font=font) - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - elif len(a) == 3: - org = 29 - len(a[0]) + 2, 7 - x, y = org - fontScale = lenghth(a[0]) - font = ImageFont.truetype("1.ttf", fontScale) - # thin border - text = a[0] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[0], color, font=font) - - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - org = 29 - len(a[1]) + 2, 210 - x, y = org - fontScale = lenghth(a[1]) - font = ImageFont.truetype("1.ttf", fontScale) - - # thin border - text = a[1] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[1], color, font=font) - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - org = 29 - len(a[2]) + 2, 239 - x, y = org - - fontScale = lenghth(a[2]) - font = ImageFont.truetype("1.ttf", fontScale) - - # thin border - text = a[2][:-1] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[2][:-1], color, font=font) - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - else: - org = 29 - len(a[0]) + 2, 7 - x, y = org - fontScale = lenghth(a[0]) - font = ImageFont.truetype("1.ttf", fontScale) - - # thin border - text = a[0] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[0], color, font=font) - - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - org = 29 - len(a[1]) + 2, 40 - x, y = org - fontScale = lenghth(a[1]) - font = ImageFont.truetype("1.ttf", fontScale) - - # thin border - text = a[1] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[1], color, font=font) - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - org = 29 - len(a[2]) + 2, 220 - x, y = org - fontScale = lenghth(a[2]) - font = ImageFont.truetype("1.ttf", fontScale) - - # thin border - text = a[2] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - draw.text(org, a[2], color, font=font) - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - org = 29 - len(a[3]) + 2, 250 - x, y = org - fontScale = lenghth(a[3]) - font = ImageFont.truetype("1.ttf", fontScale) - - # thin border - text = a[3][:-1] - draw.text((x - 1, y), text, font=font, fill=shadowcolor) - draw.text((x + 1, y), text, font=font, fill=shadowcolor) - draw.text((x, y - 1), text, font=font, fill=shadowcolor) - draw.text((x, y + 1), text, font=font, fill=shadowcolor) - - # thicker border - draw.text((x - 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y - 1), text, font=font, fill=shadowcolor) - draw.text((x - 1, y + 1), text, font=font, fill=shadowcolor) - draw.text((x + 1, y + 1), text, font=font, fill=shadowcolor) - - draw.text(org, a[3][:-1], color, font=font) - im = cv2.cvtColor(np.array(pil_im), cv2.COLOR_RGB2BGR) - return im - except Exception as e: - print(f"Exception: {e}") - img = cv2.imread("static/dontdelete/wrong.jpg") - img = cv2.resize(img, (300, 300)) - return img - - -labels = ["happy", "disgust", "neutral", "sad", "fear", "anger", "surprise"] - - -@app.route("/") -def hello(): - return render_template("memslide.html") - - -from flask import Flask, request, render_template, send_file -from werkzeug.utils import secure_filename -import os - -app = Flask(__name__) - -ALLOWED_EXTENSIONS = set(["png", "jpg", "jpeg"]) -UPLOAD_FOLDER = "./static" -app.config["UPLOAD_FOLDER"] = UPLOAD_FOLDER -app.config["MAX_CONTENT_LENGTH"] = 16 * 1024 * 1024 - - -def allowed_file(filename): - return "." in filename and filename.rsplit(".", 1)[1].lower() in ALLOWED_EXTENSIONS - - -@app.route("/") -def hello_world(): - return render_template("memslide.html") - - -@app.route("/", methods=["POST"]) -def upload_file(): - file = request.files.get("photo", None) - - if file and allowed_file(file.filename): - now = datetime.now() - now = str(now)[:-7] - - filename = secure_filename(file.filename) - - extension = filename.split(".") - now = now + "." + extension[-1] - now = now.split() - now = secure_filename(now[0] + "-" + now[1]) - file.save(os.path.join(app.config["UPLOAD_FOLDER"], now)) - img = cv2.imread("static/" + now) - # img = cv2.resize(img, (224, 224)) - picture = detectface(img) - if picture is False: - img = text_alignment("noface", img) - cv2.imwrite("static/results/" + now, img) - else: - img = cv2.resize(img, (224, 224)) - picture = cv2.resize(picture, (224, 224)) - path = "models/memegen1.tflite" - results = layer(path, labels, [picture]) - output = sorted(results, key=results.get, reverse=True) - print(output[0]) - img = text_alignment(output[0], img) - cv2.imwrite("static/results/" + now, img) - print("Finish!") - Image1 = Image.open("static/results/" + now) - Image1copy = Image1.copy() - Image2 = Image.open("static/dontdelete/logo.jpeg") - Image2copy = Image2.copy() - Image2copy.putalpha(128) - Image2copy = Image2copy.resize((60, 30), Image.LANCZOS) - Image1copy.paste(Image2copy, (235, 265)) - Image1copy.save("static/results/" + now) - result_dic = { - "im": "results/" + now, - } - return render_template("memslide.html", image=result_dic) - else: - result_dic = { - "im": "dontdelete/file.jpg", - } - return render_template("memslide.html", image=result_dic) - - -app.run(host="0.0.0.0", port=1234) diff --git a/restapi/memegen/static/.gitignore b/restapi/memegen/static/.gitignore deleted file mode 100644 index 90c74cf..0000000 --- a/restapi/memegen/static/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*png -*jpg -*jpeg diff --git a/restapi/memegen/static/dontdelete/file.jpg b/restapi/memegen/static/dontdelete/file.jpg new file mode 100644 index 0000000..365d0fd Binary files /dev/null and b/restapi/memegen/static/dontdelete/file.jpg differ diff --git a/restapi/memegen/static/dontdelete/logo.jpeg b/restapi/memegen/static/dontdelete/logo.jpeg new file mode 100644 index 0000000..3a8c7ac Binary files /dev/null and b/restapi/memegen/static/dontdelete/logo.jpeg differ diff --git a/restapi/memegen/static/dontdelete/wrong.jpg b/restapi/memegen/static/dontdelete/wrong.jpg new file mode 100644 index 0000000..6e118ea Binary files /dev/null and b/restapi/memegen/static/dontdelete/wrong.jpg differ diff --git a/restapi/memegen/static/images/MemeG.png b/restapi/memegen/static/images/MemeG.png new file mode 100644 index 0000000..eb16bad Binary files /dev/null and b/restapi/memegen/static/images/MemeG.png differ diff --git a/restapi/memegen/static/images/MemeGen.png b/restapi/memegen/static/images/MemeGen.png new file mode 100644 index 0000000..e1616c6 Binary files /dev/null and b/restapi/memegen/static/images/MemeGen.png differ diff --git a/restapi/memegen/static/images/angry.jpg b/restapi/memegen/static/images/angry.jpg new file mode 100644 index 0000000..95509c5 Binary files /dev/null and b/restapi/memegen/static/images/angry.jpg differ diff --git a/restapi/memegen/static/images/angry.png b/restapi/memegen/static/images/angry.png new file mode 100644 index 0000000..d53711b Binary files /dev/null and b/restapi/memegen/static/images/angry.png differ diff --git a/restapi/memegen/static/images/demo1.png b/restapi/memegen/static/images/demo1.png new file mode 100644 index 0000000..15ba53b Binary files /dev/null and b/restapi/memegen/static/images/demo1.png differ diff --git a/restapi/memegen/static/images/disgust.png b/restapi/memegen/static/images/disgust.png new file mode 100644 index 0000000..de66ce4 Binary files /dev/null and b/restapi/memegen/static/images/disgust.png differ diff --git a/restapi/memegen/static/images/fear.png b/restapi/memegen/static/images/fear.png new file mode 100644 index 0000000..f7a0b4c Binary files /dev/null and b/restapi/memegen/static/images/fear.png differ diff --git a/restapi/memegen/static/images/meme.jpeg b/restapi/memegen/static/images/meme.jpeg new file mode 100644 index 0000000..e473446 Binary files /dev/null and b/restapi/memegen/static/images/meme.jpeg differ diff --git a/restapi/memegen/static/images/meme1.jpg b/restapi/memegen/static/images/meme1.jpg new file mode 100644 index 0000000..bfb117f Binary files /dev/null and b/restapi/memegen/static/images/meme1.jpg differ diff --git a/restapi/memegen/static/images/meme3.jpg b/restapi/memegen/static/images/meme3.jpg new file mode 100644 index 0000000..4473728 Binary files /dev/null and b/restapi/memegen/static/images/meme3.jpg differ diff --git a/restapi/memegen/static/images/meme4.jpg b/restapi/memegen/static/images/meme4.jpg new file mode 100644 index 0000000..8a8b0af Binary files /dev/null and b/restapi/memegen/static/images/meme4.jpg differ diff --git a/restapi/memegen/static/images/meme5.jpeg b/restapi/memegen/static/images/meme5.jpeg new file mode 100644 index 0000000..4ebfb07 Binary files /dev/null and b/restapi/memegen/static/images/meme5.jpeg differ diff --git a/restapi/memegen/static/images/neutral.png b/restapi/memegen/static/images/neutral.png new file mode 100644 index 0000000..c70ffe4 Binary files /dev/null and b/restapi/memegen/static/images/neutral.png differ diff --git a/restapi/memegen/static/images/sad.png b/restapi/memegen/static/images/sad.png new file mode 100644 index 0000000..6d6398d Binary files /dev/null and b/restapi/memegen/static/images/sad.png differ diff --git a/restapi/memegen/static/images/shock.png b/restapi/memegen/static/images/shock.png new file mode 100644 index 0000000..4215945 Binary files /dev/null and b/restapi/memegen/static/images/shock.png differ diff --git a/restapi/memegen/static/images/smilelaugh.jpg b/restapi/memegen/static/images/smilelaugh.jpg new file mode 100644 index 0000000..81f0a1e Binary files /dev/null and b/restapi/memegen/static/images/smilelaugh.jpg differ diff --git a/restapi/memegen/static/inputs/.gitignore b/restapi/memegen/static/inputs/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/restapi/memegen/static/inputs/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/restapi/memegen/static/results/.gitignore b/restapi/memegen/static/results/.gitignore index 54e1d5d..5e7d273 100644 --- a/restapi/memegen/static/results/.gitignore +++ b/restapi/memegen/static/results/.gitignore @@ -1,6 +1,4 @@ -# .gitignore sample -# Ignore all files in this dir... +# Ignore everything in this directory * - -# ... except for this one. +# Except this file !.gitignore diff --git a/restapi/memegen/templates/memslide.html b/restapi/memegen/templates/memslide.html index 1cfc05d..4e1891d 100644 --- a/restapi/memegen/templates/memslide.html +++ b/restapi/memegen/templates/memslide.html @@ -2,7 +2,7 @@ -