Oviya commited on
Commit ·
4e121c9
1
Parent(s): 1202633
add vocabularybuilder
Browse files5 unmodified lines67891011122 unmodified lines1516171819202122232425262728293031325 unmodified linesprovidedIn: 'root'})export class VocabularyBuilderService {private baseUrl: string = 'http://127.0.0.1:5002'; // Update the URL if neededconstructor(private http: HttpClient) { }// Fetch vocabulary word and related options2 unmodified lines}// ✅ Fix: Add this missing method//getFeedback(): Observable<any> {// return this.http.get<any>(`${this.baseUrl}/get-feedback`); // Ensure your backend has this endpoint//}//getSentenceFeedback(): Observable<any> {// return this.http.get<any>(`${this.baseUrl}/get-sentence-feedback`); // Ensure this API exists in backend//}// Validate the user's selected wordsvalidateSelection(word: string, selectedWords: string[], allOptions: string[]): Observable<any> {// Construct the request body5 unmodified lines67891011121314152 unmodified lines1819202122235 unmodified linesprovidedIn: 'root'})export class VocabularyBuilderService {private baseUrl = location.hostname.endsWith('hf.space')? 'https://pykara-py-learn-backend.hf.space/media': 'http://localhost:5000/media';constructor(private http: HttpClient) { }// Fetch vocabulary word and related options2 unmodified lines}// Validate the user's selected wordsvalidateSelection(word: string, selectedWords: string[], allOptions: string[]): Observable<any> {// Construct the request body
src/app/vocabulary-builder/vocabulary-builder.service.ts+4-13