Skip to content

Instantly share code, notes, and snippets.

@swaaz
Created June 22, 2020 11:18
Show Gist options
  • Save swaaz/389c97f575fb9b570cf09af26118fa2e to your computer and use it in GitHub Desktop.
Save swaaz/389c97f575fb9b570cf09af26118fa2e to your computer and use it in GitHub Desktop.
GUI
#include<stdio.h>
int square(int i) {
return i * i;
}
import streamlit as st
import imp
# importing c file using CDLL
from ctypes import *
so_file = "./app.so"
my_functions = CDLL(so_file)
st.title("Hello World!!!!!!!!")
st.sidebar.title("About")
st.sidebar.selectbox("Module",["Module-1", "Module-2","Module-3", "Module-4", "Module-5"])
st.sidebar.text("RS")
st.button("Previous")
st.button("Next")
ans = my_functions.square(10)
print(ans)
st.write(ans)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment