<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arkadeep Nag</title>
    <description>The latest articles on DEV Community by Arkadeep Nag (@arkadeepnag).</description>
    <link>https://dev.to/arkadeepnag</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F690265%2F9679cbcb-7eac-46ee-8e85-e5c0b9bee498.jpg</url>
      <title>DEV Community: Arkadeep Nag</title>
      <link>https://dev.to/arkadeepnag</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arkadeepnag"/>
    <language>en</language>
    <item>
      <title>Artificial Learners, Not Artificial Intelligence: Why Bigger Data Isn't Enough</title>
      <dc:creator>Arkadeep Nag</dc:creator>
      <pubDate>Mon, 14 Oct 2024 07:57:36 +0000</pubDate>
      <link>https://dev.to/arkadeepnag/artificial-learners-not-artificial-intelligence-why-bigger-data-isnt-enough-1mb</link>
      <guid>https://dev.to/arkadeepnag/artificial-learners-not-artificial-intelligence-why-bigger-data-isnt-enough-1mb</guid>
      <description>&lt;p&gt;In recent years, we’ve seen incredible advancements in machine learning. From language models that can generate realistic conversations to vision systems capable of identifying objects with remarkable accuracy, the progress is undeniable. But, as these systems grow larger and more complex, it’s becoming clear that we aren’t on the path to true artificial general intelligence (AGI)—the kind that can reason, understand, and adapt like humans. Instead, we are building "artificial learners"—machines that excel at learning from data but lack genuine understanding or intelligence.&lt;/p&gt;

&lt;h3&gt;
  
  
  More Data, Less Understanding
&lt;/h3&gt;

&lt;p&gt;A defining trend in AI development has been to make systems bigger by feeding them more data. Take GPT-3, for example, a language model with 175 billion parameters, trained on hundreds of gigabytes of text data. This scale allows it to generate fluent, human-like language. But beneath the surface, these systems don't actually understand the world the way humans do.&lt;/p&gt;

&lt;p&gt;Research has shown that simply scaling up models with more data does not equate to deeper understanding. A study from OpenAI comparing GPT-2 and GPT-3 found that while larger models show improved performance on many benchmarks, they still struggle with tasks requiring reasoning, abstraction, or common sense. For instance, when asked simple logic puzzles or math problems, GPT-3’s performance is much worse than one might expect from a system with such vast resources. This suggests that adding more data doesn’t fundamentally change the nature of these systems—they remain statistical models, not true reasoning entities.&lt;/p&gt;

&lt;p&gt;Moreover, the growth in model size has come with diminishing returns in terms of performance gains. The improvements from increasing the size of these models are getting smaller with each iteration. According to a study, while the largest models (with billions of parameters) outperform smaller ones, the performance increase is relatively modest given the huge increase in computational cost. This calls into question whether bigger models alone are the answer to developing more intelligent systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Mirage of Intelligence
&lt;/h3&gt;

&lt;p&gt;These systems can be impressive in specific tasks—completing text, identifying images, or even playing complex games like chess or Go—but this doesn’t imply they have any real understanding of what they’re doing. When interacting with them, the responses may seem intelligent, but that’s largely due to the vast amounts of data they’ve been trained on and their ability to mimic patterns found in that data.&lt;/p&gt;

&lt;p&gt;For example, in a study from MIT, researchers demonstrated that language models like GPT-3 can be easily tricked by slightly altering questions or phrasing. Despite having access to vast data, these models often fail to grasp simple concepts or adapt to unexpected inputs. They don’t "understand" the context like a human would; instead, they rely on statistical correlations between words. When those correlations break down, so does the model’s performance. This shows that while these systems are adept learners, they lack the deeper reasoning required for general intelligence.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Limits of Data-Driven Learning
&lt;/h3&gt;

&lt;p&gt;Adding more data has also not solved issues related to bias, fairness, or robustness. Large models often inadvertently reinforce the biases present in their training data. A 2020 study by researchers at Stanford highlighted that language models trained on internet text reflect the societal biases found in those texts. For example, models trained on large datasets can produce biased or harmful outputs, simply reflecting the biases in the data they were exposed to, without any inherent "understanding" of the implications of those outputs.&lt;/p&gt;

&lt;p&gt;Another limitation is the inability of data-driven models to transfer knowledge effectively to new, unseen tasks. A hallmark of human intelligence is our ability to apply knowledge gained in one domain to a completely different one. AI models, by contrast, are typically specialized to perform specific tasks they've been trained for. When presented with new tasks or environments, they often struggle. A 2022 paper from Google Research revealed that scaling up models doesn’t automatically make them better at generalizing to unfamiliar tasks. Despite training on vast amounts of data, these systems can fail dramatically when faced with scenarios outside their training distribution.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Pursuit of AGI: A Misguided Path?
&lt;/h3&gt;

&lt;p&gt;The pursuit of AGI—the kind of intelligence that mirrors human cognitive abilities—will likely not be achieved by simply scaling up data and models. Data-driven approaches, while powerful for specific tasks, do not lead to the kind of general reasoning, problem-solving, and understanding required for true intelligence. What we have today are highly specialized learners, capable of mastering certain tasks within narrowly defined domains, but unable to generalize their learning or engage in deeper cognitive functions.&lt;/p&gt;

&lt;p&gt;In contrast, human intelligence is built on an understanding of the world, the ability to reason about causes and effects, and the flexibility to apply knowledge across contexts. Current AI models lack this adaptability. They are artificial learners—extremely good at learning from patterns in data—but they fall far short of true intelligence.&lt;/p&gt;

&lt;h3&gt;
  
  
  Moving Beyond Artificial Learners
&lt;/h3&gt;

&lt;p&gt;The path forward in AI may not lie in simply building bigger models with more data but in developing new architectures that mimic the processes underlying human cognition. This might involve combining deep learning with other approaches like symbolic reasoning, causal inference, or even neuromorphic computing, which aims to replicate the structure of the human brain. These approaches could allow systems to not only learn from data but also reason, understand, and adapt to new and unforeseen challenges.&lt;/p&gt;

&lt;p&gt;In conclusion, while the current wave of AI models has achieved impressive feats, we are not on the path to creating artificial general intelligence. Instead, we are refining artificial learners—systems that are excellent at processing and learning from data but fundamentally limited in their ability to reason, understand, or generalize. If we want to build machines that are truly intelligent, we’ll need to move beyond the paradigm of bigger data and start focusing on the deeper, cognitive processes that make human intelligence so unique.&lt;/p&gt;

&lt;h3&gt;
  
  
  References:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Brown, T. et al. (2020).&lt;/strong&gt; Language Models are Few-Shot Learners. &lt;em&gt;OpenAI.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bender, E. et al. (2021).&lt;/strong&gt; On the Dangers of Stochastic Parrots: Can Language Models Be Too Big? &lt;em&gt;FAccT Conference.&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>openai</category>
      <category>ai</category>
      <category>google</category>
      <category>llm</category>
    </item>
    <item>
      <title>Why seeing yourself in future after time travelling is impossible ?</title>
      <dc:creator>Arkadeep Nag</dc:creator>
      <pubDate>Sat, 09 Jul 2022 10:33:56 +0000</pubDate>
      <link>https://dev.to/arkadeepnag/why-seeing-yourself-in-future-after-time-travelling-is-impossible--1cnk</link>
      <guid>https://dev.to/arkadeepnag/why-seeing-yourself-in-future-after-time-travelling-is-impossible--1cnk</guid>
      <description>&lt;p&gt;&lt;strong&gt;How beautiful it would be if you can see what you will be doing in the future ?&lt;/strong&gt;&lt;br&gt;
Maybe you would take over SpaceX or would be the next big billionaire.&lt;/p&gt;

&lt;p&gt;TV Shows show you so-&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb19jpcs8r5fjur9fmij.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb19jpcs8r5fjur9fmij.jpg" alt="No Desc" width="748" height="611"&gt;&lt;/a&gt;&lt;br&gt;
But here's the logical reality to it.&lt;br&gt;
Maybe you are going in the future with a time machine and when you land there you saw the utopian future but its not having you. You are no where in the future except yourself.&lt;/p&gt;

&lt;p&gt;You expectedto see yourself in a great position in the future but you cannot find yourself there in the future. What happened ?&lt;/p&gt;

&lt;p&gt;Actually the thing is since you were time travelling you might have forgot that you were racing with time instead of building the future. You were going ahead of it. So when you reached there you didn't saw the future version of yourself. &lt;/p&gt;

&lt;p&gt;Simply you can understand it like this :-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You are time travelling in the same universe therefore you cannot expect to see your dopleganger in the future.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You were travelling faster than the speed of light and that's why you reached in the future you were travelling with time.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Merge the points one and two :-&lt;br&gt;
You donot have a dopleganger to replace you in the world when you are time travelling so who will you see when you go there , you weren't there to build your future , therefore you will only be able to see one version of yourself in the future and that's you. &lt;/p&gt;

</description>
      <category>physics</category>
      <category>timetravel</category>
      <category>future</category>
    </item>
    <item>
      <title>How I am creating my own search engine</title>
      <dc:creator>Arkadeep Nag</dc:creator>
      <pubDate>Fri, 25 Mar 2022 17:45:19 +0000</pubDate>
      <link>https://dev.to/arkadeepnag/how-i-am-creating-my-own-search-engine-h8m</link>
      <guid>https://dev.to/arkadeepnag/how-i-am-creating-my-own-search-engine-h8m</guid>
      <description>&lt;h1&gt;
  
  
  Creating a search engine from scratch
&lt;/h1&gt;

&lt;p&gt;The basic function of a search engine is to search . But that basic function includes a lot of work in the background .&lt;br&gt;
That include :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Crawling websites / Creating a software that goes through websites and get their data&lt;/li&gt;
&lt;li&gt;More importantly get the legal permission of the website owner to allow us crawl their website &lt;/li&gt;
&lt;li&gt;Creating a database &lt;/li&gt;
&lt;li&gt;Creating ranking algorithms&lt;/li&gt;
&lt;li&gt;Creating ML models for various purposes which includes understanding speech , understanding images , language and many more &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now no useful search engines in the world is open source so we cannot just use any code from someone else .&lt;br&gt;
We had to begin from strach &lt;/p&gt;

&lt;h1&gt;
  
  
  Creating a Search engine from my experience
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Steps for beginning the creation
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Identify which form of database you want to use 
Either you can use a graph database , SQL  database , NO SQL databas or just create a database with customisations yourself&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Since no database system was totally free to use I created my own Database system which is partially based of Graph SQL and NoSQL .&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Identify the programming language you will use for the crawling process&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You have Python as one of the best option byut C or C++ is required for MapReduce algorithms in some cases &lt;br&gt;
You can use simple modules already existing in python family or go around with Cython which I for myself used &lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Identify which language you are going to use for your frontend development&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;you can use C , C++ or Python as they would be compatible with all your frameworks and then use SWIG or Webassembly to convert it to JavaScript or &lt;br&gt;
use JavaScript frameworks in which you may get problems to include your ML and AI models.I personally used the first option to include my ML models with ease&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Defy algorithms and their respective flowcharts that you need to generate better search results. You may require atleast ten of them &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;1st for crawling the webpages &lt;br&gt;
2nd for crawling the webpages through backlinks &lt;br&gt;
3rd update the webpages frequently&lt;br&gt;
4th Continuously run the crawlers&lt;br&gt;
5th Identify elements from websites and classify them&lt;br&gt;
6th How will your DB work&lt;br&gt;
7th Connecting DB from many servers together&lt;br&gt;
8th Responding to queries &lt;br&gt;
Then your ML models&lt;br&gt;
Your AI Models&lt;br&gt;
How will you rank your search results&lt;br&gt;
Query management&lt;br&gt;
And many more&lt;br&gt;
I personally wrote many . This part gives a bit of an headache&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Begin with Frontend
&lt;/h3&gt;

&lt;p&gt;The frontend will attract your users and force them to invite many . But your website is going to pull a lot of information and can slow down if it is made with high graphics . So make it minimalistic but beautiful&lt;/p&gt;

&lt;p&gt;Creating the frontend first would also give you some relief from the headache of creating long algorithms&lt;/p&gt;

&lt;h3&gt;
  
  
  Create the crawler
&lt;/h3&gt;

&lt;p&gt;Though I have used Cython ( C and Python )I would rather prefer others using python with third party frameworks - &amp;gt; Selenium and Beautiful Soup or Scrapy&lt;/p&gt;

&lt;h3&gt;
  
  
  Choose a Database
&lt;/h3&gt;

&lt;p&gt;I created my own Database with some help of opensource GraphQl and NoSQl database .&lt;br&gt;
I made it scalable so that it can handle many data and queries . It is also scalable . I used Ruby , Python and C for creating it . I am using 7 Server computers to host the db &lt;/p&gt;

&lt;p&gt;It would be easy to query from NOSQl DB and Graph db ( from my experience ) &lt;br&gt;
But you can choose other DB . For free option you can use Firestore from Firebase it's simple and easy .&lt;/p&gt;

&lt;h3&gt;
  
  
  Building your server
&lt;/h3&gt;

&lt;p&gt;If you are not using any cloud database and want to have your own server and DB use a Linux device and old PCs or if you have money buy some low end servers &lt;/p&gt;

&lt;h3&gt;
  
  
  Handling Pentabytes of data
&lt;/h3&gt;

&lt;p&gt;My crawler uptill now has crawled 3M+ webpages and it has cached more than 156GB data . Every second 30+ webpages are added to the index . Google has stored 136Trillion + webpages and so you got the idea in no time you will have billions and billions of data to handle . So our database needs to be scalable . I have AI models to manage them and it has been made scalable so you have to make an idea to handle them &lt;/p&gt;

&lt;h3&gt;
  
  
  Algorithms for ranking your search results
&lt;/h3&gt;

&lt;p&gt;The data you will get perquery will be huge if you have many pages indexed . So ranking them would be a factor . I didn't use the "PageRank" algorithm but devised my own . I have made the algorithm not to look after how many backlinks point to the page but I have used 8 parameters&lt;/p&gt;

&lt;p&gt;You can break down a query for e.g.&lt;/p&gt;

&lt;p&gt;This is a search results&lt;/p&gt;




&lt;p&gt;In this search query which words have more emphasis it's the fourth and the last because the first three don't really matter much in a sentence while searching.&lt;/p&gt;

&lt;p&gt;If any page has this two word they would be ranked based on how many times they are repeated .&lt;/p&gt;

&lt;p&gt;For example we have 5 pages having search and results &lt;br&gt;
1.A 2.B 3.C 4.D 5.C &lt;br&gt;
And we have 2 pages each with only one of them so they will be ranked down &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;E 7. F&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first check will end here &lt;/p&gt;

&lt;p&gt;The second parameter is in which pages the words are given more emphasis&lt;/p&gt;

&lt;p&gt;For example if a word is in title of a webpage it will be given more emphasis than the webpage having it in its body &lt;/p&gt;

&lt;p&gt;Suppose "A" has the words in body and "B" has the word in title &lt;/p&gt;

&lt;p&gt;So now the ranking will change to &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;B 2. A&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The third parameter will now intervene it will check how does the whole webpage relates to the user's query . Like location , mood ( mood detection algorithm ) , tone ( tone of the words ) and many other things &lt;br&gt;
. Suppose the query is more related to the webpage on "C " more than "A" and "B"&lt;br&gt;
New rankings -&amp;gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;C 2. B 3. A&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Fourth parameter will check the clicking ratio of that website on similar queries. For example if someone clicks "B" more than "C" when searching for related queries then the ranking of "B" will automatically increased &lt;/p&gt;

&lt;h1&gt;
  
  
  Being personal
&lt;/h1&gt;

&lt;p&gt;The rest four and other topics are not possible to cover in single blog . &lt;br&gt;
I have worked ver hard for the last 3 years for creating the search engine I hope you will like it when it launches this year. Now it's on the verge of being completed.&lt;/p&gt;

&lt;p&gt;If you wanna see or experience an old build of the similar search engine with no algorithms and firebase database then go to &lt;a href="https://dravel.herokuapp.com" rel="noopener noreferrer"&gt;https://dravel.herokuapp.com&lt;/a&gt; &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frcjeht7fmv0ztzusigl7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frcjeht7fmv0ztzusigl7.png" alt="Image description" width="800" height="500"&gt;&lt;/a&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntvb872th3qnbt606udb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntvb872th3qnbt606udb.png" alt="Image description" width="800" height="1280"&gt;&lt;/a&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4errkvfsdy65r0jib6hj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4errkvfsdy65r0jib6hj.png" alt="Image description" width="800" height="1280"&gt;&lt;/a&gt;&lt;br&gt;
Thank you very much for reading till last&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Nothing</title>
      <dc:creator>Arkadeep Nag</dc:creator>
      <pubDate>Sun, 26 Dec 2021 08:48:47 +0000</pubDate>
      <link>https://dev.to/arkadeepnag/why-is-web-30-a-backstab-to-the-internet-world-3l94</link>
      <guid>https://dev.to/arkadeepnag/why-is-web-30-a-backstab-to-the-internet-world-3l94</guid>
      <description></description>
    </item>
    <item>
      <title>Creating a GUI Python App with Firebase SignIn - Python Firebase || GUI Python App</title>
      <dc:creator>Arkadeep Nag</dc:creator>
      <pubDate>Fri, 20 Aug 2021 16:02:55 +0000</pubDate>
      <link>https://dev.to/arkadeepnag/creating-a-gui-python-app-with-firebase-signin-part-1-8hb</link>
      <guid>https://dev.to/arkadeepnag/creating-a-gui-python-app-with-firebase-signin-part-1-8hb</guid>
      <description>&lt;p&gt;We will create a GUI APP with python with firebase login and signup functions .&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frkznvt65u8vboucno3mw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frkznvt65u8vboucno3mw.PNG" alt="image" width="658" height="678"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On Sign Up ---&amp;gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpi1ilqb51r6zbi11az1u.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpi1ilqb51r6zbi11az1u.PNG" alt="image" width="448" height="644"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fokdzv8lbcscuy0ileojm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fokdzv8lbcscuy0ileojm.PNG" alt="image" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On Sign In--&amp;gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqo1erxjww10al82x99u8.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqo1erxjww10al82x99u8.PNG" alt="image" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 1 --&amp;gt; The first step to do is to create a firebase project . &lt;br&gt;
Go to the firebase console on &lt;a href="https://console.firebase.com" rel="noopener noreferrer"&gt;https://console.firebase.com&lt;/a&gt; -&amp;gt; Then create a new project -&amp;gt; Go the project settings to check the config details . If you do not find them then create a new firebase web project .&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzuin2dy254nki9s0dzmf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzuin2dy254nki9s0dzmf.png" alt="image" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F459tukm61j6g1ymsb9vm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F459tukm61j6g1ymsb9vm.PNG" alt="image" width="800" height="434"&gt;&lt;/a&gt;&lt;br&gt;
Step 2 --&amp;gt; The second step is to create a new python file with the name firebase.py or main.py (name doesn't matter). Then use pip install pyrebase (For Windows).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install pyrebase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3--&amp;gt; The third step is to install PyQt5 by using pip install pyqt5 (For Windows) -&amp;gt; Then install pip install pyqt5-tools (For Windows)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install PyQt5
pip install pyqt5-tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from PyQt5 import QtCore, QtGui, QtWidgets
import sys
import pyrebase 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 4 -- &amp;gt; Initialize Firebase with Pyrebase&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;config = {
    "apiKey": "AIzaSyDZw2TKNMPLkFBI7qPzklTGbd8bYkIyfUc",
    "authDomain": "py-firebase-f97fc.firebaseapp.com",
    "databaseURL": "https://py-firebase-f97fc-default-rtdb.firebaseio.com",
    "projectId": "py-firebase-f97fc",
    "storageBucket": "py-firebase-f97fc.appspot.com",
    "messagingSenderId": "130186938120",
    "appId": "1:130186938120:web:d8b87ef2a01af62dbf4ebd",
    "measurementId": "G-9R811DMZEL",
    "serviceAccount":".\py-firebase-f97fc-firebase-adminsdk-7w4qw-52ae79b7e5.json"
    }

firebase = pyrebase.initialize_app(config)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 5 --&amp;gt; Check whether there is already an user present or not&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try:
    IsUser=user['userId']
except:
       IsUser = None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 6 --&amp;gt; On step 6 we start defining the auth&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;auth = firebase.auth()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 7 --&amp;gt; Now its the the time for creating a class and check if there is a user or not&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Ui_Dialog(object):
# if IsUser == None :
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 8 --&amp;gt; We define the GUI . I have created it with Qt5 Designer , You can create your own or use my code for practice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
def setupUi(self, Dialog):
        Dialog.setObjectName("Python with Firebase")
        Dialog.resize(447, 621)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalFrame = QtWidgets.QFrame(Dialog)
        self.verticalFrame.setMinimumSize(QtCore.QSize(429, 300))
        self.verticalFrame.setObjectName("verticalFrame")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalFrame)
        self.verticalLayout.setObjectName("verticalLayout")

        self.lineEdit = QtWidgets.QLineEdit(self.verticalFrame)
        self.lineEdit.setMinimumSize(QtCore.QSize(300, 40))
        self.lineEdit.setMaximumSize(QtCore.QSize(500, 40))
        self.lineEdit.setStyleSheet("border-radius:2px;\n"
        "padding:2px;\n"
        "content:'Email';\n"
"border:1px solid #262626;")
        self.lineEdit.setObjectName("lineEdit")
        self.verticalLayout.addWidget(self.lineEdit, 0, QtCore.Qt.AlignHCenter)
        self.lineEdit_2 = QtWidgets.QLineEdit(self.verticalFrame)
        self.lineEdit_2.setMinimumSize(QtCore.QSize(300, 40))
        self.lineEdit_2.setMaximumSize(QtCore.QSize(300, 40))
        self.lineEdit_2.setStyleSheet("\n"
"border-radius:2px;\n"
"padding:2px;\n"
"content:'Password';\n"
"border:1px solid #262626;")
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.verticalLayout.addWidget(self.lineEdit_2, 0, QtCore.Qt.AlignHCenter)
        self.toolButton_2 = QtWidgets.QToolButton(self.verticalFrame)
        self.toolButton_2.setMinimumSize(QtCore.QSize(300, 40))
        self.toolButton_2.setMaximumSize(QtCore.QSize(300, 40))
        self.toolButton_2.setStyleSheet("background:#ccc;\n"
"border-radius:2px;\n"
"\n"
"")
        self.toolButton_2.setObjectName("toolButton_2")
        self.verticalLayout.addWidget(self.toolButton_2, 0, QtCore.Qt.AlignHCenter)
        self.toolButton = QtWidgets.QToolButton(self.verticalFrame)
        self.toolButton.setMinimumSize(QtCore.QSize(300, 40))
        self.toolButton.setMaximumSize(QtCore.QSize(300, 40))
        self.toolButton.setStyleSheet("background-color:#f23041;\n"
"border-radius:5px;\n"
"color:#fff;\n"
"")

        self.toolButton.setObjectName("toolButton")
        self.verticalLayout.addWidget(self.toolButton, 0, QtCore.Qt.AlignHCenter)
        self.gridLayout.addWidget(self.verticalFrame, 0, 1, 1, 1)
        self.toolButton_2.clicked.connect(self.signin)
        self.toolButton.clicked.connect(self.signup)
        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
        self.toolButton_2.setText(_translate("Dialog", "SignIn"))


        self.toolButton.setText(_translate("Dialog", "SignUp"))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the next step we will define the onclick controls for the signin and signup buttons , whose onclick function has already been declared&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;self.toolButton_2.clicked.connect(self.signin)
self.toolButton.clicked.connect(self.signup)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 9 --&amp;gt; The Onclick functions&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def signup(self):
        email = self.lineEdit.text()
        password = self.lineEdit.text()
        user = auth.create_user_with_email_and_password(email, password)
        user = auth.refresh(user['refreshToken'])
        print('Sucessfully accounted in: {0}'.format(user['userId']))
        IsUser=user['userId']

    def signin(self):
        email = self.lineEdit.text()
        password = self.lineEdit.text()
        user = auth.sign_in_with_email_and_password(email, password) 
        user = auth.refresh(user['refreshToken'])
        print('Sucessfully logged in: {0}'.format(user['userId']))
        IsUser=user['userId']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we have declared the firebase login and signup functions with a message that would be printed on the console and you can see it if the task is successful.&lt;/p&gt;

&lt;p&gt;On the basis of what task you perform &lt;br&gt;
Step 10 --&amp;gt; On the last and final step lets start the window with an if statement&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)

    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_Dialog()

    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the app ...&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fok2ys62fvgsxzmlr3olt.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fok2ys62fvgsxzmlr3olt.PNG" alt="image" width="800" height="232"&gt;&lt;/a&gt;&lt;br&gt;
The whole code is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from PyQt5 import QtCore, QtGui, QtWidgets
import sys
import pyrebase 
config = {
    "apiKey": "AIzaSyDZw2TKNMPLkFBI7qPzklTGbd8bYkIyfUc",
    "authDomain": "py-firebase-f97fc.firebaseapp.com",
    "databaseURL": "https://py-firebase-f97fc-default-rtdb.firebaseio.com",
    "projectId": "py-firebase-f97fc",
    "storageBucket": "py-firebase-f97fc.appspot.com",
    "messagingSenderId": "130186938120",
    "appId": "1:130186938120:web:d8b87ef2a01af62dbf4ebd",
    "measurementId": "G-9R811DMZEL",
    "serviceAccount":".\py-firebase-f97fc-firebase-adminsdk-7w4qw-52ae79b7e5.json"
    }

firebase = pyrebase.initialize_app(config)
try:
    IsUser=user['userId']
except:
       IsUser = None
auth = firebase.auth()
class Ui_Dialog(object):
# if IsUser == None :
    def setupUi(self, Dialog):
        Dialog.setObjectName("Python with Firebase")
        Dialog.resize(447, 621)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.verticalFrame = QtWidgets.QFrame(Dialog)
        self.verticalFrame.setMinimumSize(QtCore.QSize(429, 300))
        self.verticalFrame.setObjectName("verticalFrame")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalFrame)
        self.verticalLayout.setObjectName("verticalLayout")

        self.lineEdit = QtWidgets.QLineEdit(self.verticalFrame)
        self.lineEdit.setMinimumSize(QtCore.QSize(300, 40))
        self.lineEdit.setMaximumSize(QtCore.QSize(500, 40))
        self.lineEdit.setStyleSheet("border-radius:2px;\n"
        "padding:2px;\n"
        "content:'Email';\n"
"border:1px solid #262626;")
        self.lineEdit.setObjectName("lineEdit")
        self.verticalLayout.addWidget(self.lineEdit, 0, QtCore.Qt.AlignHCenter)
        self.lineEdit_2 = QtWidgets.QLineEdit(self.verticalFrame)
        self.lineEdit_2.setMinimumSize(QtCore.QSize(300, 40))
        self.lineEdit_2.setMaximumSize(QtCore.QSize(300, 40))
        self.lineEdit_2.setStyleSheet("\n"
"border-radius:2px;\n"
"padding:2px;\n"
"content:'Password';\n"
"border:1px solid #262626;")
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.verticalLayout.addWidget(self.lineEdit_2, 0, QtCore.Qt.AlignHCenter)
        self.toolButton_2 = QtWidgets.QToolButton(self.verticalFrame)
        self.toolButton_2.setMinimumSize(QtCore.QSize(300, 40))
        self.toolButton_2.setMaximumSize(QtCore.QSize(300, 40))
        self.toolButton_2.setStyleSheet("background:#ccc;\n"
"border-radius:2px;\n"
"\n"
"")
        self.toolButton_2.setObjectName("toolButton_2")
        self.verticalLayout.addWidget(self.toolButton_2, 0, QtCore.Qt.AlignHCenter)
        self.toolButton = QtWidgets.QToolButton(self.verticalFrame)
        self.toolButton.setMinimumSize(QtCore.QSize(300, 40))
        self.toolButton.setMaximumSize(QtCore.QSize(300, 40))
        self.toolButton.setStyleSheet("background-color:#f23041;\n"
"border-radius:5px;\n"
"color:#fff;\n"
"")

        self.toolButton.setObjectName("toolButton")
        self.verticalLayout.addWidget(self.toolButton, 0, QtCore.Qt.AlignHCenter)
        self.gridLayout.addWidget(self.verticalFrame, 0, 1, 1, 1)
        self.toolButton_2.clicked.connect(self.signin)
        self.toolButton.clicked.connect(self.signup)
        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
        self.toolButton_2.setText(_translate("Dialog", "SignIn"))


        self.toolButton.setText(_translate("Dialog", "SignUp"))

    def signup(self):
        email = self.lineEdit.text()
        password = self.lineEdit.text()
        user = auth.create_user_with_email_and_password(email, password)
        user = auth.refresh(user['refreshToken'])
        print('Sucessfully accounted in: {0}'.format(user['userId']))
        IsUser=user['userId']

    def signin(self):
        email = self.lineEdit.text()
        password = self.lineEdit.text()
        user = auth.sign_in_with_email_and_password(email, password)
        user = auth.refresh(user['refreshToken'])
        print('Sucessfully logged in: {0}'.format(user['userId']))
        IsUser=user['userId']



if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)

    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_Dialog()

    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The whole code is also on my github repository -&amp;gt; &lt;a href="https://github.com/Arkadeep-Nag/py-firebase-app/blob/main/main.py" rel="noopener noreferrer"&gt;https://github.com/Arkadeep-Nag/py-firebase-app/blob/main/main.py&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>firebase</category>
      <category>pyqt5</category>
      <category>guipyapp</category>
    </item>
  </channel>
</rss>
