This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import FastAPI, Request | |
from fastapi.middleware.cors import CORSMiddleware | |
from starlette.middleware.sessions import SessionMiddleware | |
import uvicorn | |
import os | |
from dotenv import load_dotenv | |
from main import gpt3_logs, main | |
app = FastAPI() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './App.css'; | |
import { useEffect, useState, useRef } from 'react' | |
import React from 'react' | |
import arrow from './assets/arrow.png' | |
import bg from './assets/bg.png' | |
import mic from './assets/mic.png' | |
import mic_on from './assets/mic_on.png' | |
import axios from 'axios'; | |
import SpeechRecognition, { useSpeechRecognition } from 'react-speech-recognition' | |
import { Dna } from 'react-loader-spinner' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am VBot, your personal assistant. I can answer questions based on quantum physics. | |
Answer questions based on the passage given below. | |
What Is Quantum Physics? | |
Quantum physics is the study of matter and energy at the most fundamental level. It aims to uncover the properties and behaviors of the very building blocks of nature. While many quantum experiments examine very small objects, such as electrons and photons, quantum phenomena are all around us, acting on every scale. However, we may not be able to detect them easily in larger objects. This may give the wrong impression that quantum phenomena are bizarre or otherworldly. In fact, quantum science closes gaps in our knowledge of physics to give us a more complete picture of our everyday lives. | |
Quantum discoveries have been incorporated into our foundational understanding of materials, chemistry, biology, and astronomy. These discoveries are a valuable resource for innovation, giving rise to devices such as lasers and transistors, and enabling real progr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
// This widget is the root of your application. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row justify-content-center"> | |
<div class="col-md-4 register-employee"> | |
<!-- form card register --> | |
<div class="card card-outline-secondary"> | |
<div class="card-header"> | |
<h3 class="mb-0">Edit Employee</h3> | |
</div> | |
<div class="card-body"> | |
<form [formGroup]="editForm" (ngSubmit)="onSubmit()"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Employee } from './../../model/employee'; | |
import { Component, OnInit } from '@angular/core'; | |
import { ActivatedRoute, Router } from "@angular/router"; | |
import { ApiService } from './../../service/api.service'; | |
import { FormGroup, FormBuilder, Validators } from "@angular/forms"; | |
@Component({ | |
selector: 'app-employee-edit', | |
templateUrl: './employee-edit.component.html', | |
styleUrls: ['./employee-edit.component.css'] | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<!-- No data message --> | |
<p *ngIf="Employee.length <= 0" class="no-data text-center">There is no employee added yet!</p> | |
<!-- Employee list --> | |
<table class="table table-bordered" *ngIf="Employee.length > 0"> | |
<thead class="table-success"> | |
<tr> | |
<th scope="col">Employee ID</th> | |
<th scope="col">Name</th> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { ApiService } from './../../service/api.service'; | |
@Component({ | |
selector: 'app-employee-list', | |
templateUrl: './employee-list.component.html', | |
styleUrls: ['./employee-list.component.css'] | |
}) | |
export class EmployeeListComponent implements OnInit { | |
Employee:any = [];constructor(private apiService: ApiService) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row justify-content-center"> | |
<div class="col-md-4 register-employee"> | |
<!-- form card register --> | |
<div class="card-body"> | |
<form [formGroup]="employeeForm" (ngSubmit)="onSubmit()"> | |
<div class="form-group"> | |
<label for="inputName">Name</label> | |
<input class="form-control" type="text" formControlName="name"> | |
<!-- error --> | |
<div class="invalid-feedback" *ngIf="submitted && myForm.name.errors?.required"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Router } from '@angular/router'; | |
import { ApiService } from './../../service/api.service'; | |
import { Component, OnInit, NgZone } from '@angular/core'; | |
import { FormGroup, FormBuilder, Validators } from "@angular/forms"; | |
@Component({ | |
selector: 'app-employee-create', | |
templateUrl: './employee-create.component.html', | |
styleUrls: ['./employee-create.component.css'] | |
}) | |
export class EmployeeCreateComponent implements OnInit { |