Spaces:
Sleeping
Sleeping
import gradio as gr | |
from process import inference | |
def clickit(video, prompt): | |
return inference( | |
video, | |
prompt | |
) | |
with gr.Blocks() as blok: | |
with gr.Row(): | |
with gr.Column(): | |
video = gr.Video( | |
label="video input", | |
value="delay_tire.mp4", | |
) | |
prompt = gr.Text( | |
label="Prompt", | |
value="""You are an expert AI model trained to analyze and interpret manufacturing processes. The task is to evaluate video footage of specific steps in a tire manufacturing process. The process has 8 total steps, but only delayed steps are provided for analysis. | |
**Your Goal:** | |
1. Analyze the provided video. | |
2. Identify possible reasons for the delay in the manufacturing step shown in the video. | |
3. Provide a clear explanation of the delay based on observed factors, such as machinery issues, material handling delays, operator inefficiency, or other possible causes. | |
**Input:** | |
- The attached video shows a single step from the tire manufacturing process. | |
- Context: Tire manufacturing involves 8 steps, and delays may occur due to machinery faults, raw material availability, labor efficiency, or unexpected disruptions. | |
**Output:** | |
Explain why the delay occurred in this step. Include specific observations and their connection to the delay. | |
**Example Output:** | |
"The delay in this step seems to be caused by improper alignment of the conveyor belt, which slowed down the transfer of materials. Additionally, manual intervention by operators was observed, which could indicate a malfunctioning automated system." | |
**Important:** | |
Focus on observations from the video and provide reasons that align with the context of tire manufacturing. | |
""" | |
) | |
with gr.Column(): | |
button = gr.Button("Reason for delay", variant="primary") | |
text = gr.Text(label="Output") | |
button.click( | |
fn=clickit, | |
inputs=[video, prompt], | |
outputs=[text] | |
) | |
blok.launch() |