arjunanand13 commited on
Commit
1dedabd
·
verified ·
1 Parent(s): 87397e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -127,17 +127,17 @@ def inference(video, step_number):
127
  with open(video_path, "rb") as f:
128
  video_data = f.read()
129
 
130
- # Get possible reasons for the selected step
131
- possible_reasons = DELAY_REASONS[step_number]
132
-
133
- # Generate the analysis prompt
134
- prompt = get_analysis_prompt(step_number, possible_reasons)
135
-
136
- # Get model prediction
137
- temperature = 0.8
138
- response = predict(prompt, video_data, temperature, model, tokenizer)
139
-
140
- return response
141
 
142
  # Gradio Interface
143
  def create_interface():
 
127
  with open(video_path, "rb") as f:
128
  video_data = f.read()
129
 
130
+ # Get possible reasons for the selected step
131
+ possible_reasons = DELAY_REASONS[step_number]
132
+
133
+ # Generate the analysis prompt
134
+ prompt = get_analysis_prompt(step_number, possible_reasons)
135
+
136
+ # Get model prediction
137
+ temperature = 0.8
138
+ response = predict(prompt, video_data, temperature, model, tokenizer)
139
+
140
+ return response
141
 
142
  # Gradio Interface
143
  def create_interface():