Skip to content

Commit

Permalink
wip: remove api analysis image
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjun authored and Arjun committed Dec 6, 2024
1 parent 65596bc commit a8b123f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
24 changes: 0 additions & 24 deletions src/api/index.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/pages/preview/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import Button from '~/components/Button.vue'
import PictureReview from './PictureReview.vue'
// Import Pintura styles
import '@pqina/pintura/pintura.css'
import { getChatCompletion } from '~/api'
const store = new LazyStore('settings.json')
Expand Down Expand Up @@ -53,17 +52,6 @@ function onSave() {
appWindow.close()
}
async function getImageAnalysis() {
// get image base64
const imageBase64 = await invoke('get_image_base64', {
path: imagePath.value,
})
console.log("imageBase64", imageBase64)
const imageUrl = `data:image/jpeg;base64,${imageBase64}`
const response = await getChatCompletion(imageUrl)
console.log('response', response)
}
onMounted(async () => {
const val = await store.get<{ value: string }>('screenshot_path')
appWindow.listen<string>('image-prepared', (event: any) => {
Expand Down Expand Up @@ -96,9 +84,6 @@ onMounted(async () => {
<Button class-name="btn-solid" :anim="true" @click="onSave">
Save
</Button>
<Button class-name="btn-solid" :anim="true" @click="getImageAnalysis">
Fetch
</Button>
</div>
</div>
</template>
Expand Down

0 comments on commit a8b123f

Please sign in to comment.