Skip to content

Commit

Permalink
dubugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzyy committed Oct 26, 2024
1 parent 67bcce7 commit 1256da1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/pages/AIPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ const AIPage = () => {
const handleSubmit = async (e) => {
if (e) e.preventDefault();
setLoading(true);
console.log(`${process.env.REACT_APP_BASE_URL}`)
setError('');
try {
const response = await axios.post(`${process.env.REACT_APP_BASE_URL}/api/generate`, { user_input: userInput });

console.log(response.data);
const content = response.data.pipeline_content;
const explanationDelimiter = '**Explanation:**';
const [pipeline, explanation] = content.split(explanationDelimiter).map(str => str.trim());
Expand Down

0 comments on commit 1256da1

Please sign in to comment.