Skip to content

Commit

Permalink
Merge branch 'dev_bbs' of github.com:siliconflow/BizyAir into dev_bbs
Browse files Browse the repository at this point in the history
  • Loading branch information
doombeaker committed Nov 20, 2024
2 parents f1cfbfc + 0cdccda commit 99167a2
Show file tree
Hide file tree
Showing 35 changed files with 432 additions and 449 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/workflow-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
python3 tests/test_examples.py
env:
BIZYAIR_KEY: ${{ secrets.BIZYAIR_KEY }}
BIZYAIR_API_KEY: ${{ secrets.BIZYAIR_KEY }}
PYTHONPATH: ${{ github.workspace }}/ComfyUI

- name: Run ComfyUI on Windows
Expand All @@ -112,4 +113,5 @@ jobs:
python3 tests/test_examples.py
env:
BIZYAIR_KEY: ${{ secrets.BIZYAIR_KEY }}
BIZYAIR_API_KEY: ${{ secrets.BIZYAIR_KEY }}
PYTHONPATH: ${{ github.workspace }}/ComfyUI
132 changes: 0 additions & 132 deletions biz_lib_frontend/src/components/Test.vue

This file was deleted.

1 change: 0 additions & 1 deletion biz_lib_frontend/src/components/markdown/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const vditorConfig: IOptions = {
}
}
],
// cdn: 'https://bizyair-dev.oss-cn-shanghai.aliyuncs.com/assets/vditor',
upload: {
url: '/bizyair/community/files/upload',
max: 20 * 1024 * 1024,
Expand Down
6 changes: 0 additions & 6 deletions biz_lib_frontend/src/components/markdown/Index2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ const toolbar = [
'mermaid', 'katex', '-',
'link', '=',
'preview',
// 'previewOnly',
0
];
const isFullscreen = ref(false);
Expand Down Expand Up @@ -150,10 +148,6 @@ config({
},
});
// onMounted(() => {
// console.log(mdEditorFull.value.toggleFullscreen)
// mdEditorFull.value.toggleFullscreen();
// });
</script>
<style scoped>
:deep(.md-editor-toolbar-item svg.md-editor-icon) {
Expand Down
21 changes: 9 additions & 12 deletions biz_lib_frontend/src/components/model-detail/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const currentVersion = ref<ModelVersion>()
const downloadOpen = ref(false)
const scrollViewportRef = ref<any | null>(null)
const props = defineProps<{
modelId: string,
version: ModelVersion
Expand Down Expand Up @@ -210,8 +209,7 @@ const handleCopy = async (sign: string) => {

<template>
<div v-if="model"
class="bg-[#353535] rounded-radius-rounded-lg border-solid border-border-border-toast-destructive border p-6 pb-12 flex flex-col gap-4 items-start justify-start min-w-[1000px] min-h-screen relative"
style="box-shadow: 0px 20px 40px 0px rgba(0, 0, 0, 0.25)">
class="p-6 pb-12 flex flex-col gap-4 items-start justify-start min-w-[1000px] relative shadow-[0px_20px_40px_0px_rgba(0,0,0,0.25)]">
<div class="flex flex-col gap-1.5 items-start justify-start self-stretch shrink-0 relative">
<div class="flex flex-row gap-2 items-center justify-start self-stretch shrink-0 relative">
<div
Expand Down Expand Up @@ -267,14 +265,15 @@ const handleCopy = async (sign: string) => {
<div class="flex flex-row gap-1 items-center justify-start self-stretch shrink-0 relative">
<div
class="bg-[#4e4e4e] rounded-lg p-1 flex flex-row gap-4 items-start justify-start self-stretch shrink-0 relative">
<div class="w-[300px]">
<div class="min-w-[200px] max-w-[600px]">
<ScrollArea ref="scrollViewportRef" class="rounded-md w-full">
<div class="whitespace-nowrap">
<Tabs :defaultValue="currentVersion?.id" :value="currentVersion?.id">
<TabsList class="inline-flex h-12 bg-[#4E4E4E] text-sm w-auto">
<TabsList class="inline-flex h-12 bg-transparent text-sm w-auto">
<TabsTrigger v-for="version in model?.versions" :value="version.id"
@click="handleTabChange(version.id)" :class="['version-tab', `version-tab-${version.id}`]"
class="text-sm text-white data-[state=active]:bg-[#9CA3AF] data-[state=active]:text-white h-10 px-3 py-2">
class="text-sm text-white bg-[#9CA3AF] data-[state=active]:bg-[#7C3AED] data-[state=active]:text-white h-10 px-3 py-2 mx-1">

{{ version.version }}
</TabsTrigger>
</TabsList>
Expand Down Expand Up @@ -355,12 +354,10 @@ const handleCopy = async (sign: string) => {
</div>
</div>
<div class="flex flex-row gap-8 items-start justify-start self-stretch flex-1 relative">
<div class="flex flex-col gap-4 items-start justify-start relative min-w-[620px] w-[65%] overflow-hidden ">
<ScrollArea class="h-[80vh] w-full ">
<!-- <MdPreview id="previewRef" :modelValue="content" :noImgZoomIn="true" :preview="true" theme="dark"
class="bg-[#353535] w-full " /> -->
<div class="flex flex-col gap-4 items-start justify-start relative min-w-[620px] w-[65%] overflow-hidden ">
<div class="w-full min-h-[80vh]">
<MdPreview v-if="currentVersion?.intro" id="previewRef" :modelValue="currentVersion?.intro"
:noImgZoomIn="true" :preview="true" theme="dark" class="bg-[#353535] w-full" />
:noImgZoomIn="true" :preview="true" theme="dark" class="bg-[#353535] w-full min-h-[80vh]" />
<div v-else class="w-full h-[80vh] bg-[#353535] rounded-tl-lg rounded-tr-lg">
<div class="flex justify-center items-center h-full">
<div
Expand All @@ -369,7 +366,7 @@ const handleCopy = async (sign: string) => {
</div>
</div>
</div>
</ScrollArea>
</div>
</div>
<div class="flex flex-col gap-6 items-start justify-start w-[40%] relative">
<div class="pb-8 flex flex-col gap-6 items-start justify-start shrink-0 h-[97px] relative">
Expand Down
38 changes: 21 additions & 17 deletions biz_lib_frontend/src/components/model-select/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import type { Model, ModelVersion, CommonModelType } from '@/types/model'
import ModelFilterBar from './ModelFilterBar.vue'
import ModelTable from './ModelTable.vue'
import ModelPagination from './ModelPagination.vue'
import { base_model_types, get_model_list, model_types } from '@/api/model'
import { onMounted } from 'vue'
import { useToaster } from '@/components/modules/toats/index'
Expand Down Expand Up @@ -133,32 +133,36 @@ onMounted(async () => {
</script>

<template>
<v-dialog v-model:open="showDialog" class="max-w-[70%] px-6 pb-6">
<template #title><span
class="text-[#F9FAFB] mb-4 text-[18px] font-semibold leading-[18px] tracking-[-0.45px]">Select
Model</span></template>
<div class="font-['Inter']">
<Tabs :defaultValue="modelStoreInstance.mode" class="mb-4" @update:model-value="handleTabChange">
<TabsList class="grid w-full grid-cols-3 h-12 bg-[#4E4E4E] text-sm">
<v-dialog v-model:open="showDialog" class="max-w-[70%] px-6 pb-6 overflow-hidden"
contentClass="custom-scrollbar max-h-[80vh] overflow-y-auto w-full rounded-tl-lg rounded-tr-lg custom-shadow">
<template #title>
<span class="text-[#F9FAFB] mb-4 text-[18px] font-semibold leading-[18px] tracking-[-0.45px]">
Select Model
</span>
</template>

<div class="font-['Inter'] flex flex-col ">
<Tabs :defaultValue="modelStoreInstance.mode" class="h-full flex flex-col" @update:model-value="handleTabChange">
<TabsList class="grid w-full grid-cols-3 h-12 bg-[#4E4E4E] text-sm shrink-0">
<TabsTrigger v-for="mode in modes" :key="mode" :value="mode"
class="text-sm text-white data-[state=active]:bg-[#9CA3AF] data-[state=active]:text-white h-10 px-3 py-2 focus:outline-none focus-visible:outline-none">
{{ tabLabels[mode] }}
</TabsTrigger>
</TabsList>

<template v-for="mode in modes" :key="mode">
<TabsContent v-if="modelStoreInstance.mode === mode" :value="mode" class="h-[600px] flex flex-col">
<ModelFilterBar v-model:show-sort-popover="showSortPopover" @fetchData="getModelList" />
<div class="flex-1 min-h-0">
<ModelTable v-if="models.length > 0" :models="models" />
<div v-else class="flex items-center justify-center h-full">
<div class="text-center text-gray-500">
<div class="mb-2">No Data</div>
<p class="text-sm">No models available</p>
<TabsContent v-show="modelStoreInstance.mode === mode" :value="mode"
class="flex-1 flex flex-col overflow-hidden ">
<div class="flex flex-col min-h-[650px] ">
<div class="flex-1 relative">
<ModelFilterBar v-model:show-sort-popover="showSortPopover" @fetchData="getModelList"
class="shrink-0" />
<div class="h-full">
<ModelTable :models="models" />
</div>
</div>
<div class="h-4"></div>
</div>
<ModelPagination v-if="models.length > 0" @change="getModelList" />
</TabsContent>
</template>
</Tabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,17 @@ const handlePageChange = (page: number) => {
</script>

<template>
<div v-if="showPagination" class="flex justify-center">
<div v-if="showPagination">
<Pagination v-slot="{ page }" :total="modelStoreInstance.modelListPathParams.total"
:page-size="modelStoreInstance.modelListPathParams.page_size"
:default-page="modelStoreInstance.modelListPathParams.current" :sibling-count="1" show-edges
@update:page="handlePageChange">
<PaginationList v-slot="{ items }" class="flex items-center gap-1">
<PaginationFirst class="pagination-button" />
<PaginationPrev class="pagination-button" />

<template v-for="(item, index) in items">
<PaginationListItem v-if="item.type === 'page'" :key="index" :value="item.value" as-child>
<Button class="pagination-button page-button"
:variant="item.value === page ? 'default' : 'ghost'">
<Button class="pagination-button page-button" :variant="item.value === page ? 'default' : 'ghost'">
{{ item.value }}
</Button>
</PaginationListItem>
Expand Down
Loading

0 comments on commit 99167a2

Please sign in to comment.