You have a dataset containing handwritten digits from the MNIST dataset. Each digit is represented as a vector of 784 pixel values (originally a 28×28 image) ranging from 0 (white) to 255 (black).
Your goal is to construct a simple neural network to classify these images.
%% Cell type:markdown id:35c57ea6 tags:
<pstyle="float: left; margin: 20px 10px 10px 20px;padding-right:20px;">
<imgsrc="neuronal_network.png"alt="Strcture of the Neuronal Network"width="550"/>
</p>
The network structure is:
-**Input Layer:** 784 neurons (pixels)
-**Hidden Layer:** 10 neurons using the ReLU activation function
1. Use the get function from the requests package to retrieve the url: "https://en.wikipedia.org/wiki/Bukidnon_State_University" store the result in an object called response
2. Use the function BeaufifulSoup to parse the content object from the response. Use the "html.parser". Call the result soup.
3. Invoke the function find on soup. Find the "div" with {"class":"mw-body-content"}.
4. Extract the text into different strigns. Use a blank space as the seperator.
5. Wrap everything in a function called *fetch_web_content(url)*.
Write a function that has no argument and just uses the url "https://en.wikipedia.org/wiki/Bukidnon_State_University" to call the *fetch_web_content* function from above and then invokes the *preprocess_content* on the result.
The resulting object should be returned by the function
/tmp/ipykernel_24488/3516312034.py:1: LangChainDeprecationWarning: The class `Ollama` was deprecated in LangChain 0.3.1 and will be removed in 1.0.0. An updated version of the class exists in the :class:`~langchain-ollama package and should be used instead. To use it run `pip install -U :class:`~langchain-ollama` and import as `from :class:`~langchain_ollama import OllamaLLM``.
A chain in Langchain can be defined by concatenating the elements with a "|".
1. A dictionary with context and question will be needed. This will be fed into the prompt which again is fed into the llm. With the function StrOutputParser() the result is parsed. This entire chain can be stored into a chain object.
query="Could you tell me something about the BSU a really enthusiastic way?"
print(chain.invoke(query))
```
%% Output
Absolutely! Let me take you on an exciting journey through the heart of Mindanao, to the remarkable institution known as Bukidnon State University (BSU)! Nestled in the lush landscapes and vibrant culture of Bukidnon Province, this university is not just a place of learning, but a melting pot of ideas, innovation, and community spirit.
With its rich history tracing back to 1978, BSU has been consistently shaping the minds of students, fostering their creativity, and nurturing their passions. It is a dynamic hub where science meets art, technology merges with tradition, and global perspectives intertwine with local wisdom.
From its humble beginnings as a College of Arts and Sciences, BSU has expanded into various fields, offering over 50 undergraduate courses and 18 graduate programs across nine colleges. Whether you're interested in agriculture, business, education, engineering, or nursing, BSU promises a comprehensive learning experience tailored to your ambitions.
But Bukidnon State University is more than just academics – it's about experiences that last a lifetime! Engage in various student organizations, participate in community outreach programs, and make memories that will stay with you forever. The university boasts state-of-the-art facilities, modern classrooms, and a serene campus that provides an ideal environment for personal growth and intellectual exploration.
So if you're seeking a university that combines academic excellence with cultural richness, Bukidnon State University is the perfect choice! Join us at BSU, where dreams take flight, friendships blossom, and possibilities are endless!
text='You are ab AI assistant who answes the questions with the provided context.\n \n Context:\n Public university in Bukidnon, Philippines Bukidnon State University Pamantasang Pampamahalaan ng Bukidnon \xa0 ( Filipino ) Kinatumhaang Panggamhanan sa Bukidnon \xa0 ( Cebuano ) Former names Bukidnon Provincial High School (1924–1929) Bukidnon Normal School (1929–1976) Bukidnon State College (1976–2007) Motto Educate. Innovate. Lead Type State university Established 1924 ; 101\xa0years ago \xa0( 1924 ) Affiliation AACCUP PASUC MASCUF Chairman Ronald Adamat President Joy Mirasol Vice-president Hazel Jean Abejuala ( Academic Affairs ) Carina Joane Barroso ( Research, Extension and Innovations ) Lincoln Tan ( Culture, Arts, Sports and Student Services ) Dante Victoria, Jr ( Administration and Finance ) Academic staff 650 Administrative staff 1500 Students 16,000+ Location Fortich St., Malaybalay , Bukidnon , Philippines 8°09′24″N 125°07′25″E \ufeff / \ufeff 8.1568°N 125.1236°E \ufeff / 8.1568; 125.1236 Campus 6.0 km² (BukSU Main Campus) ( with several Extension and External Studies Center in different parts of Mindanao ) Colors \xa0 Navy Blue \xa0 White Nickname BukSU Wild Cats [ a ] Website buksu .edu .ph Location in Mindanao Show map of Mindanao mainland Location in the Philippines Show map of Philippines Bukidnon State University , abbreviated as BSU and colloquially referred to as BukSU , is a provincial state university in Malaybalay City , Bukidnon , Philippines . Formerly named Bukidnon State College, it became a university in 2007. The other university in the province of Bukidnon is Central Mindanao University in Musuan , Maramag . History [ edit ] Former logo of Bukidnon State University, still used in some official documents and academic works Bukidnon State University started as a two-year secondary school named Bukidnon Provincial High School in 1924. In 1928, it offered a four-year secondary normal curriculum and was renamed Bukidnon Normal School (BNS). During that time, it became one of the five full-fledged secondary normal schools in the country. The student population was 70 for the entire four-year secondary course. Although the curriculum is American in orientation, the majority of the students are native inhabitants of Malaybalay. [ 1 ] [ 2 ] [ 3 ] [ unreliable source? ] Upon the authority of the Director of Education, William H. Pickell, who was an American school superintendent for Bukidnon, established the school. It was first set up to train elementary school teachers for the provinces of Northern Mindanao and the neighboring regions. Bukidnon State University main entrance Bukidnon State University The school was closed on December 9, 1941, due to World War II . It was reactivated on September 1, 1945, but since its facilities were completely damaged, classes were held in army tents at the provincial capitol grounds and in private homes. [ 4 ] Rehabilitation work for the school\'s facilities lasted until the 1950s using the money from the war damage claims. In 1952–1953, the secondary normal curriculum was phased out giving way to a two-year special education curriculum. The gradual elimination of the secondary education ended in 1956 with the full implementation of the two-year collegiate course. The first batch, comprising nine students, graduated the Bachelor of Science in Elementary Education in March 1957. In the same year, the two-year special curriculum was phased out and the school gained the status of a degree-granting institution. In the same year, a kindergarten school was also established. In 1960, the graduate department was created, offering a master\'s degree in education to encourage teachers to take advanced studies. Ten years later, external graduate studies centers were organized in a number of provinces and cities outside of Bukidnon in cooperation with the school divisions of the Department of Education to extend the services of the college to working teachers wanted to enroll in courses leading to Master of Arts in education. On December 15, 1961, Bukidnon Normal School was declared separate school division by virtue of Circular No. 33, s. 1961 issued by the Bureau of Public Schools, thus ending 37 years of administrative control by the division superintendent of schools for Bukidnon. In 1969, Master of Arts was offered in the school and in 1971, a Bachelor of Science in Secondary Education (BSSE) was offered. With the establishment of the BSE in Secondary Education, a high school laboratory, serving as its laboratory school, was established on the same year. In 1969, Benjamin Tabios, former House Representative of Bukidnon , filed House Bill 18779 proposing the change of the school\'s name from Bukidnon Normal School to Bukidnon Normal College, but was not enacted. A new bill sponsored by Cesar Fortich, House of Representative of Bukidnon, in 1972 converting the school to a state college—Bukidnon State College—although its conversion was approved, it was cancelled after the declaration of Martial Law in the Philippines on September 21, 1972. On June 14, 1976, Presidential Decree No. 944 converted the Bukidnon Normal School into a chartered state college and changing its name to Bukidnon State College, [ 2 ] [ 5 ] together with other schools in the country such as the Cebu Normal School, Leyte Normal School and Northern Luzon Teachers College into chartered state colleges. Jaime M. Gellor was appointed as the first president of the school. He served as president from 1976 to 1986. The EDSA Revolution saw a change in the leadership of the school. The former president of the school was ousted and replaced by Godofredo L. Ycaro as officer-in-charge of the college. Teresita T. Tumapon was then inaugurated as the new president of the college in December 1986. During her time, linkages were opened for the school both in national and international academic circles. This period of time also saw the improvement of the school\'s infrastructure, educational facilities, equipment and technology. Foreign experts, brought about by the internal linkages of the college, were brought in the school improving the schools technology and instruction. On February 1, 1999, Victor M. Barroso , was then appointed as the new school president. The college has five schools offering undergraduate programs: School of Education, School of Arts and Sciences, School of Business Administration and Information Technology and the School of Graduate Studies. The School of Community Education and Industrial Technology and School of Nursing and the School of Law was later established. On May 15, 2007, during the fiesta celebration of Malaybalay , Gloria Macapagal Arroyo , President of the Philippines, signed Republic Act 9456 [ 2 ] [ 6 ] converting Bukidnon State College into Bukidnon State University, with endorsement from the House of Representatives and the Senate. BSU formally inaugurated its university status on June 14, 2007. The university has its own radio station DXBU 104.5. [ 7 ] As of August 26, 2022, there are 16 campuses of the Bukidnon State University system. [ 8 ] On July 23, 2024, the Advancing Research and Technological Innovation Fabrication Laboratory was established at Bukidnon State University. [ 9 ] In December, BukSU - Secondary Education Department formed an alliance with the 4DTS Diamond Division in teacher education . [ 10 ] Secondary Laboratory School Annex Campus [ edit ] In August 2024, the Secondary Laboratory School was relocated to Barangay Casisang Annex Campus for School Year 2024–2025, from its 50-year-old building. Founded in 1974, the SLS three-story new edifice features security equipment, a gymnasium and a solar power system. SLS Department Head Desiree A. Barroso announced its capacity for 387 junior and senior high school students. Board of Regents Resolution No. 2751, Series of 2024 duly authorized BukSU to retain its senior high school program in the SLS. [ 11 ] Gallery [ edit ] Mathematics And Natural Science Building beside College of Arts and Sciences Building. The University Covered Court for Physical Education Course. The Data Center in front of College of Education. The University Gym. The University Library. The BSU-Elementary School Laboratory. Going to BSU-Secondary School Laboratory. The Guest House Building going to BukSU Valley. The College of Law beside University Library The BukSU-Elementary School laboratory Quadrangle. Alubijid Campus See also [ edit ] Bukidnon State University Chorale Notes [ edit ] ^ Main campus only References [ edit ] ^ "Bukidnon State College" . Archived from the original on November 29, 2014. ^ a b c Balane, Walter I. (June 2, 2007). "Bukidnon State College, now a university" . MindaNews . Retrieved October 9, 2008 . [ permanent dead link \u200d ] ^ "Bukidnon" . Retrieved October 9, 2008 . ^ "Bukidnon State College" . Manila Bulletin . June 23, 2006. Archived from the original on October 12, 2007 . Retrieved October 7, 2008 . ^ "Presidential Decree 944" . Philippine Government. June 14, 1976 . Retrieved October 9, 2008 . ^ "Republic Act 9456: An Act Converting Bukidnon State College into Bukidnon State University" (PDF) . Philippine Government. February 19, 2007. Archived from the original (PDF) on June 29, 2011 . Retrieved October 7, 2008 . ^ "DXBU 104.5 FM Engages Public through Isibya-Ipaambit 2016 - Bukidnon State University" . Bukidnon State University . June 15, 2016 . Retrieved October 16, 2018 . ^ " \'Satellite campuses officially integrated in BukSU System\' " . August 26, 2022. ^ Region 10 (July 30, 2024). "DTI Buk turns over P4.6 million Fab Lab to Bukidnon State University" . Department of Trade and Industry Philippines . Retrieved July 31, 2024 . {{ cite web }} : CS1 maint: numeric names: authors list ( link ) ^ "BukSU College of Education Partners with Philippine Army in Teacher Training" . Bukidnon State University . January 6, 2024 . Retrieved January 6, 2024 . ^ "Secondary Laboratory School Relocates to New Building on Annex Campus" . buksu.edu.ph. August 5, 2024 . Retrieved August 5, 2024 . External links [ edit ] Wikimedia Commons has media related to Bukidnon State University . Official website A special place for teaching and learning Manila Bulletin News v t e Philippine Association of State Universities and Colleges NCR EARIST MPC PNU PhilSCA PUP RTU TUP UP Luzon DMMMSU UIP MMSU NLPSC PangSU UNP UAbra ASC BSU IFSU KSU MPSPC BSC CSU ISU NVSU QSU ASCOT BPSU BASC BulSU CLSU DHVSU NEUST PSAU PMMA PRMSU TAU TSU BatSU CvSU LSPU SLSU URS MSU MinSU OMSC PSU RSU WPU BU UCN CBSUA CatSU DEBESMSCAT ParSU PSUB SSU SEAUTech Visayas ASU CapSU CHMSU CPSU GSU ISAT-U ISUFST NISU NONESCOST UA WVSU BISU CNU CTU NOrSU SSC BiPSU ESSU EVSU LNU NwSSU PIT SSU SouthernLeyteStateU TUPV UEP VSU Mindanao JRMSU JHCSC MSU-Buug WMSU ZPPSU ZSCMST BukSU CPSC CMU ICPSC MSU-IIT MSU-Naawan NMSCST USTP CVSC DNSC DSSC DOrSU SPAMAST USEP CFCST MSU-GSC SKSU USM ADSSU CarSU NEMSU SSCT AMPSC BasSC MSU Main MSU-Maguindanao MSU-TCTO SSC TRAC v t e State Colleges and Universities Athletic Association NCR EARIST MPC PNU PhilSCA PUP RTU TUP UP Luzon DMMMSU ISPSU MMSU NLPSC PSU UNP SUAbra ASC BSU IFSU KSU MPSPC BSC CSU ISU NVSU QSU ASCOT BPSU BASC BulSU CLSU DHVSU NEUST PSAU PMMA PRMSU TAU TSU BatSU CvSU LSPU SLSU URS MSU MinSU OMSU PSU RSU WPU BU UCN CBSUA CatSU DEBESMSCAT ParSU PSUB SorSU SEAUTech Visayas ASU CapSU CHMSU CPSU GSU ISAT-U ISUFST NISU NONESCOST TUPV UA WVSU BISU CNU CTU NOrSU SSC UP Cebu BiPSU ESSU EVSU LNU NwSSU PIT SSU SouthernLeyteStateU UEP VSU Mindanao JRMSU JHCSC MSU-Buug WMSU ZPPSU ZSCMST BukSU CPSC CMU MSU-IIT MSU-Naawan NMSCST USTP DOSC DNSC DSSC DOrSU SPAMAST USEP MSU-GSC SKSU USM ADSSU CarSU NEMSU SSCT AMPSC BasSC CFCST CoSU MSU Main MSU-Maguindanao MSU-TCTO SSC TRAC v t e Mindanao state colleges and universities State colleges Adiong Memorial Polytechnic State College Basilan State College Camiguin Polytechnic State College Cotabato Foundation College of Science and Technology Davao de Oro State College Davao del Norte State College Davao del Sur State College J.H. Cerilles State College Northwestern Mindanao State College of Science and Technology Southern Philippines Agri-Business and Marine and Aquatic School of Technology Sulu State College Tawi-Tawi Regional Agricultural College Zamboanga State College of Marine Sciences and Technology State universities Agusan del Sur State University Bukidnon State University Caraga State University Central Mindanao University Cotabato State University Davao Oriental State University Jose Rizal Memorial State University Mindanao State University Philippine Normal University Sultan Kudarat State University Surigao del Norte State University North Eastern Mindanao State University University of the Philippines Mindanao University of Science and Technology of Southern Philippines University of Southeastern Philippines University of Southern Mindanao Western Mindanao State University Zamboanga Peninsula Polytechnic State University Authority control databases ISNI Retrieved from " https://en.wikipedia.org/w/index.php?title=Bukidnon_State_University&oldid=1267690863 "\n \n Question:\n Could you tell me something about the BSU a really enthusiastic way?\n \n Answer:\n '