Spaces:
Runtime error
Runtime error
File size: 1,055 Bytes
c352470 63117b9 16572be c352470 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import streamlit as st
import numpy as np
import cv2
from PIL import Image
import optic1
from functions import image_show
def screen_scan_main():
st.title("Optik Okuma")
image_file = st.file_uploader(
"Upload image for testing", type=['jpeg', 'png', 'jpg', 'webp'])
if image_file != None:
image = Image.open(image_file)
image = np.array(image.convert('RGB'))
if st.button("Process"):
#(ans_txt,pathImage, save_images= True)
grading, wrong_ans, student_idFix, resim_list =optic1.optic1(ans_txt="cevapanahtari.txt",pathImage=image,save_images=False)
image_show(resim_list)
grading = str(grading)
wrong_ans = str(wrong_ans)
student_idFix = str(student_idFix)
st.write("Notu:",grading)
st.write("Yanlis Yaptigi sorular:",wrong_ans)
st.write("Ogrenci Numarasi:",student_idFix)
#python -m streamlit run app.py
if __name__ == '__main__':
screen_scan_main() |