Skip to content

Instantly share code, notes, and snippets.

View AvikantSrivastava's full-sized avatar
:octocat:
Building Intelligent Systems

Avikant Srivastava AvikantSrivastava

:octocat:
Building Intelligent Systems
View GitHub Profile
@AvikantSrivastava
AvikantSrivastava / Midjourney.modelfile
Created February 15, 2024 15:23
Ollama model file for Midjourney
# Modelfile for creating a Midjourney prompts from a topic
# This prompt was adapted from the original at https://www.greataiprompts.com/guide/midjourney/best-chatgpt-prompt-for-midjourney/
# Run `ollama create mj -f ./Modelfile` and then `ollama run mj` and enter a topic
FROM zephyr
PARAMETER temperature 0.8
PARAMETER top_k 500
PARAMETER top_p 0.9
SYSTEM """
Embrace your role as a creative illustrator. Based on a concept provided, you must produce a single paragraph with a multifaceted description of an image, ensuring significant details of the concept and more is represented in your instructions. You do not need to write complete sentences but rather short concepts with the following information: the level of detail that should be represented, an artistic style and maybe a specific name of a painter or illustrator, the ideal color pallete, lighting, mood, perspective, the setting, time of day, weather, the season, the time period, location, materials, the textures, patterns, lines, brushstrokes, technique
{"key":[{"username":"Piy6513","score":40,"round":31,"shape":"","avatar":"https://avatars.githubusercontent.com/u/77478788?v=4","time":1642933087.2510517,"timestamp":1642936736.383785},{"username":"VishSinh","score":10,"round":11,"shape":"","avatar":"https://avatars.githubusercontent.com/u/90983472?v=4","time":1642932148.573874},{"username":"jeevan1008","score":20,"round":21,"shape":"circle","avatar":"https://avatars.githubusercontent.com/u/98014718?v=4","time":1642932255.1727936,"timestamp":1642933054.651852},{"username":"Akp-arvind","score":10,"round":11,"shape":"","avatar":"https://avatars.githubusercontent.com/u/98047598?v=4","time":1642932258.6673102},{"username":"Lavanyasuc31","score":20,"round":21,"shape":"circle\r\n","avatar":"https://avatars.githubusercontent.com/u/78673575?v=4","time":1642932359.0796332,"timestamp":1642932979.9191816},{"username":"rajshreya13","score":40,"round":31,"shape":"umbrella","avatar":"https://avatars.githubusercontent.com/u/65019686?v=4","time":1642932452.9888427,"timestamp"
# Depends on pdf2image and poppler
# import module
from pdf2image import convert_from_path
# Store Pdf with convert_from_path function
images = convert_from_path('example.pdf')
for i in range(len(images)):
@AvikantSrivastava
AvikantSrivastava / dog_breed_2.ipynb
Created February 11, 2021 11:51
dog_breed_2.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AvikantSrivastava
AvikantSrivastava / index.html
Created January 22, 2021 18:28
Selectbox > radio dropdown (bootstrap)
<form>
<h3>Save the Bootstrap dropdown value</h3>
<p>Add a Bootstrap dropdown whose value is saved. By using faux radio buttons, when the form is submitted, it will know the value chosen. Unless you're in ie8 - then you'll need the extra jquery (commented out).</p>
<div class="dropdown">
<button type="button"
class="btn btn-select"
data-toggle="dropdown">Alpha</button>
<ul class="dropdown-menu dropdown-menu-select">
<li><label class="dropdown-radio">
<input type="radio" value="001" name="alphabet">